X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=hints%2Fcps_hint_4.mdwn;h=028504cde49ff991040ca84fff3ab9d04a67c20a;hp=13add0a233fcc614866f0ba6469917938d6f4c3e;hb=b37134816a0aab587f428301f705777b4ed7f3ee;hpb=413169d31f1670ffd98d2af8a962c050151cf662 diff --git a/hints/cps_hint_4.mdwn b/hints/cps_hint_4.mdwn index 13add0a2..028504cd 100644 --- a/hints/cps_hint_4.mdwn +++ b/hints/cps_hint_4.mdwn @@ -40,7 +40,7 @@ This function is developed in *The Seasoned Schemer* pp. 165-177. It accepts a l (let ([fst (let/cc k1 (begin (set! yield k1) ; now calling yield with val will bind fst to val and continue with the (cond ...) block below (walk lst) - ; the next line will be executed only when lst contains no atoms + ; the next line will be executed when we've walked to the end of lst (yield '())))]) (cond [(atom? fst) (check fst)] @@ -52,4 +52,5 @@ This function is developed in *The Seasoned Schemer* pp. 165-177. It accepts a l (delta '(((a b) ()) (c (d (d))))) ; ~~> #t (delta '(((a b c) ()) (c (d ())))) ; ~~> #t (delta '(((a b) ()) (c (d ()) c))) ; ~~> #f + (delta '((() ()) ())) ; ~~> #f