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,
You should listen to the above posters advice regarding type safety but also be aware that unsafe function such as Option.get (which is available in batteries btw) are usually suffixed with exn. If you're curious this is how Option.get or Option.get_exn could be implemented then:
let get_exn = function
| Some x -> x
| None -> raise (Invalid_argument "Option.get")