I\'m new to OCaml, I\'m trying to understand how you\'re supposed to get the value from an \'a option. According to the doc at http://ocaml-lib.sourceforge.net/doc/Option.html,
The usual way to do this is with pattern matching.
# let x = Some 4;;
val x : int option = Some 4
# match x with
| None -> Printf.printf "saw nothing at all\n"
| Some v -> Printf.printf "saw %d\n" v;;
saw 4
- : unit = ()
You can write your own get function (though you have to decide what you want to do when the value is None).