Well, that was a happy coincidence. Thank you for the explanation!
--
Chad Albers
http://www.neomantic.com
(pgp signature available on request)
On Wed, Sep 11, 2013 at 10:40 AM, Jay McCarthy wrote:
> Luckily, you've asked the person who wrote that code!
>
> There's a few things going on here...
Thanks for your help. I was sure it would have something to do with
capturing bindings in a closure, but the code in question seems to
lack a closure. Maybe I'm missing something, though.
Here's the code:
https://github.com/plt/racket/blob/v5.3.4/collects/web-server/http/request.rkt#L102.
Thank
Luckily, you've asked the person who wrote that code!
There's a few things going on here...
1. read-request is just provided for backwards compatibility, the Web
server itself ONLY use make-ext:read-request (as renamed to
make-read-request on line 23); for instance, see
https://github.com/plt/rac
I think more context would be useful to know why a specific case is useful.
But, I'll do my best with none...
By using functions like this, you can control when things happen and what
they can see. For instance...
(define (make-worker)
(define a (build-list 10 add1)
(define (worker)
;; a
Hi,
I'm wondering if someone can help me understand a design-pattern that
I have noticed in the Racket code base. (I'm teaching myself, so
review other people's code alot).
I've seen this pattern..which is a bit contrived.
(define (say-hello)
(define (display-hello)
(display "hello")))
S
5 matches
Mail list logo