Signed-off-by: Jim Pryor <profjim@jimpryor.net>
let callcc body = fun outk -> body (fun v localk -> outk v) outk
-<!-- GOTCHAS?? -->
+ <!-- GOTCHAS?? -->
3. `callcc` was originally introduced in Scheme. There it's written `call/cc` and is an abbreviation of `call-with-current-continuation`. Instead of the somewhat bulky form:
- (call/cc (lambda (k) ...))
+ (call/cc (lambda (k) ...))
-I prefer instead to use the lighter, and equivalent, shorthand:
+ I prefer instead to use the lighter, and equivalent, shorthand:
- (let/cc k ...)
+ (let/cc k ...)
Callcc examples