On 4/24/2015 7:36 AM, Jay McCarthy wrote:
My point is that ONLY the result of make-parameter and parameterize is
saved from the thread. In Racket a "parameter" has nothing to do with
a function "argument". I believe you are confused by the two when you
say "There are 9 arguments...". If you follow that documentation link,
you'll see that "parameter" is a very specific thing in Racket and
very few programs use them at all.

I'm not using parameterize at all (at least not explicitly). I receive a web request that has up to 9 arguments contained in its bindings.


(define (search request)
  (let* [
         (params     (request-bindings request))
         (cookies    (request-cookies  request))

         (pid        (find-cookie "pid" cookies))
         (county     (exists-binding? 'county params))
         (state      (exists-binding? 'state  params))
         (search-txt (exists-binding? 'query  params))
         (search-and (exists-binding? 'all  params))
         (search-or  (exists-binding? 'any  params))
         (search-not (exists-binding? 'none params))
         (page-size  (exists-binding? 'page params))
         (sort       (exists-binding? 'sort params))
         :


Using those arguments, I retrieve information from the database regarding the client that issued the request and construct a complex database query. When that query succeeds, I need to enter additional accounting data for each result based on the client - but only for results that the client actually sees (paging), not necessarily for every result.

So I need to maintain a lot of state through a continuation: the open database connection [to cache the query results in the database], the current page that the client is looking at (for navigation), and ideally the client information for accounting [though I could look that up again if necessary].

George


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to