Stdlib320.OptionGets the value of an option if it is not None. value o ~default:y is
x if o = Some xy if o = NoneA slightly more convenient variant of the previous function, where default y o is equivalent to value o ~default:y.
Monadic bind for options. It "does something" to the value of the option if it is not None, and passes along the None otherwise. bind o f is
f x if o = Some xNone if o = NoneMonadic join for options. If collapses an option whose value is an option into a single option. join oo is
Some x if oo = Some (Some x)None if oo = Some None or oo = NoneMapping function for options. It applies a function to the value of the option if the option is not None. map f o is
Some (f x) if o = Some xNone if o = NoneFolding function for options. fold ~none:x some:f o is equivalent to default x (map f o).
Converts an option to a result. to_result ~none:e o is
Ok x if o = Some xError e if o = None