X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=hints%2Fcps_hint_4.mdwn;h=9804ed62e63043c161fe02fec3b7172cb55012df;hp=2dc984d3a2c3a31131ec6722d521e883b739f794;hb=61612ba6746dc4646fb0d5bb1c9e1864bf927848;hpb=4fde59e8440a11db16396496648d9b53fe055670 diff --git a/hints/cps_hint_4.mdwn b/hints/cps_hint_4.mdwn index 2dc984d3..9804ed62 100644 --- a/hints/cps_hint_4.mdwn +++ b/hints/cps_hint_4.mdwn @@ -15,7 +15,7 @@ This function is developed in *The Seasoned Schemer* pp. 165-177. It accepts a l [(atom? (car l)) (begin (let/cc k2 (set! resume k2) ; now calling resume with val will ignore val - ; and continue with the second line of (begin ... (walk (cdr l))) + ; and continue with the final line of (begin ... (walk (cdr l))) ; when the next line is executed, yield will be bound to k1 or k3 (yield (car l))) ; the previous yield line will never return, but the following line will be executed when resume is called @@ -47,9 +47,9 @@ This function is developed in *The Seasoned Schemer* pp. 165-177. It accepts a l [else #f]) )))) - (delta '(((a b) ()) (c (d ())))) ; ~~> #f - (delta '(((a b) ()) (b (d ())))) ; ~~> #t - (delta '(((a b) ()) (c (d (d))))) ; ~~> #t + (delta '(((a b) ()) (c (d ())))) ; ~~> #f + (delta '(((a b) ()) (b (d ())))) ; ~~> #t + (delta '(((a b) ()) (c (d (d))))) ; ~~> #t (delta '(((a b c) ()) (c (d ())))) ; ~~> #t (delta '(((a b) ()) (c (d ()) c))) ; ~~> #f