Created
February 26, 2016 17:30
-
-
Save gsg/bc4d994f8ca3df56ed5c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let r : int option ref = ref None | |
let test = Lazy.from_fun (fun () -> match !r with | |
| None -> assert false | |
| Some x -> x) | |
let _ = r := Some 42 | |
let _ = print_int (Lazy.force test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment