(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)]
(delta '(((a b) ()) (c (d (d))))) ; ~~> #t
(delta '(((a b c) ()) (c (d ())))) ; ~~> #t
(delta '(((a b) ()) (c (d ()) c))) ; ~~> #f
+ (delta '((() ()) ())) ; ~~> #f