[plt-scheme] Storing the result of a eval while in a continuation
Hi Grant,
What is your question? Example of a plugin can be seen below.
context is an object providing the current page context and request
context of HWiki/PLT Web Server.
--Hans
(begin
(require (planet "hwikiplugin.scm" ("oesterholt" "hwiki.plt" 1 0)))
(lambda (context)
(let ((sqli (sqli-provider)))
(let ((R (begin
(sqli-query sqli "select page,title,part,time from register
where context=$1 order by time desc limit 30" (-> context context))
`(div ((class "lastedits"))
(h1 ,(_ "Last edits for context '~a'" (-> context context)))
,(append
`(table ((align "center")) )
'((tr (th ((class "page")) "Page")
(th ((class "part")) "Part")
(th ((class "title")) "Title")
(th ((class "time")) "Time")))
(map (lambda (row)
(apply (lambda (page title part time)
`(tr (td ((class "page")) ,(format
"~a" page))
(td ((class "part")) ,(format
"~a" part))
(td ((class "title")) ,(format
"~a" title))
(td ((class "time")) ,(format
"~a" time)))
)
row))
(sqli-fetchall sqli)))
))))
(sqli-closer sqli)
R)))
Grant Rettke schreef:
> On 7/10/07, Hans Oesterholt-Dijkema <hdnews at gawab.com> wrote:
>> This evaluation returns a lambda closure with context as a parameter.
>
> What problem does that solve? How does that look?
>
> I've got an idea, but I am not so sure.
>
>