Created
June 3, 2015 15:35
-
-
Save kayceesrk/ff3f8781fdc4306ab30a to your computer and use it in GitHub Desktop.
Stack overflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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