projects
/
lambda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fef31f3
)
tweak wrapper for delimcc
author
jim
<jim@web>
Thu, 30 Apr 2015 16:20:18 +0000
(12:20 -0400)
committer
Linux User
<ikiwiki@localhost.members.linode.com>
Thu, 30 Apr 2015 16:20:18 +0000
(12:20 -0400)
topics/week13_native_continuation_operators.mdwn
patch
|
blob
|
history
diff --git
a/topics/week13_native_continuation_operators.mdwn
b/topics/week13_native_continuation_operators.mdwn
index
179b780
..
30c85ec
100644
(file)
--- a/
topics/week13_native_continuation_operators.mdwn
+++ b/
topics/week13_native_continuation_operators.mdwn
@@
-104,10
+104,11
@@
However, OCaml doesn't have any continuation operators in its standard deploymen
# #directory "+../delimcc";;
# #load "delimcc.cma";;
# let reset_label = ref None;;
# #directory "+../delimcc";;
# #load "delimcc.cma";;
# let reset_label = ref None;;
- # let reset body = let p = Delimcc.new_prompt () in
- let oldp = !reset_label in
- reset_label := Some p; let res = Delimcc.push_prompt p body in
- reset_label := oldp; res;;
+ # let reset body =
+ let p = Delimcc.new_prompt () in
+ let oldp = !reset_label in
+ reset_label := Some p; let res = Delimcc.push_prompt p body in
+ reset_label := oldp; res;;
# let shift fun_k = match !reset_label with
| None -> failwith "shift must be inside reset"
| Some p -> Delimcc.shift p fun_k;;
# let shift fun_k = match !reset_label with
| None -> failwith "shift must be inside reset"
| Some p -> Delimcc.shift p fun_k;;