X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek13_native_continuation_operators.mdwn;h=30c85ec449bfd555539f99b62f8dbaeb6d422a5d;hp=179b7801fa8ba2508c57738053fc579c50af96bd;hb=63c32fa4bcb81ad65d403cc42652efbed9e6517f;hpb=fef31f342d31c1fd1033f6aa023d2ed7b3fc47b0 diff --git a/topics/week13_native_continuation_operators.mdwn b/topics/week13_native_continuation_operators.mdwn index 179b7801..30c85ec4 100644 --- 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;; - # 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;;