Skip to content

Instantly share code, notes, and snippets.

@kayceesrk
Created June 3, 2015 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kayceesrk/ff3f8781fdc4306ab30a to your computer and use it in GitHub Desktop.
Save kayceesrk/ff3f8781fdc4306ab30a to your computer and use it in GitHub Desktop.
Stack overflow
effect E1 : unit
effect E2 : unit
let foo f =
try f () with effect E1 k -> continue k ()
let bar () =
for i = 0 to 1000000 do
Printf.printf "bar %d\n%!" i;
perform E1
done
let () = foo
(fun () -> try bar () with effect E2 k -> ())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment