Skip to content

Instantly share code, notes, and snippets.

@shehaaz
Created October 26, 2013 03:56
Show Gist options
  • Save shehaaz/7165109 to your computer and use it in GitHub Desktop.
Save shehaaz/7165109 to your computer and use it in GitHub Desktop.
Ocaml Option Example
# let x = Some "test";;
val x : string option = Some "test"
# match x with
|None -> Printf.printf "saw none\n"
|Some v -> Printf.printf "saw %s\n" v;;
saw test
- : unit = ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment