summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6d74216)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Delimited control operators
===========================
Delimited control operators
===========================
-Here again is the CPS for `callcc`:
+Here again is the CPS transform for `callcc`:
[callcc (\k. body)] = \outk. (\k. [body] outk) (\v localk. outk v)
[callcc (\k. body)] = \outk. (\k. [body] outk) (\v localk. outk v)
(delta '(((a b) ()) (c (d (d))))) ; ~~> #t
(delta '(((a b c) ()) (c (d ())))) ; ~~> #t
(delta '(((a b) ()) (c (d ()) c))) ; ~~> #f
(delta '(((a b) ()) (c (d (d))))) ; ~~> #t
(delta '(((a b c) ()) (c (d ())))) ; ~~> #t
(delta '(((a b) ()) (c (d ()) c))) ; ~~> #f
+ (delta '((() ()) ())) ; ~~> #f