[racket] how does call/cc and let/ec exactly works?
hello
I am thinking of such a code like..
#lang scheme
(require racket/gui)
(let ([v (let/ec out
(dynamic-wind
(lambda () (display "in "))
(lambda ()
(display "pre ")
(display (call/cc out))
#f)
(lambda () (display "out "))))])
(when v (v "post ")))
but I still have no idea how
"in pre out in post out " is printed but not "in pre out in pre post out "
how does call/cc and let/ec exactly works?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101018/6e0b32ac/attachment.html>