From: Jim Pryor Date: Tue, 14 Dec 2010 10:44:20 +0000 (-0500) Subject: cps tweaks X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=fff7086c5dec8448c3a5369f3df88b50ffd06e6b;hp=6908f7726018f0d85c9c950033ffa77033ab24c1 cps tweaks Signed-off-by: Jim Pryor --- diff --git a/cps_and_continuation_operators.mdwn b/cps_and_continuation_operators.mdwn index d1a85cf8..e3fb42d0 100644 --- a/cps_and_continuation_operators.mdwn +++ b/cps_and_continuation_operators.mdwn @@ -173,15 +173,15 @@ So too will examples. We'll give some examples, and show you how to try them out let callcc body = fun outk -> body (fun v localk -> outk v) outk - + 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