X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=cps_and_continuation_operators.mdwn;h=e3fb42d09954a64bc8c315924fe4d0ae97af5847;hp=d1a85cf8e7fdd4fbf7de40cf8f769787d23fb862;hb=fff7086c5dec8448c3a5369f3df88b50ffd06e6b;hpb=6908f7726018f0d85c9c950033ffa77033ab24c1;ds=sidebyside 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