Fmlib.OptionOption Monad
Optional values
include Module_types.MONAD with type 'a t = 'a optionval return : 'a -> 'a treturn a makes a monadic container containing the value a.
m >>= f extracts the value a from the monadic container m and returns f a.
f >=> g composition of the two monadic functions f and g.
f >=> g is equivalent to fun a -> f a >>= g.
map f m maps the values in the monadic container m with the function f.
val to_list : 'a t -> 'a listval use : 'a t -> 'b -> ('a -> 'b) -> 'bval fold : 'z -> ('a -> 'z) -> 'a t -> 'zval has : 'a t -> boolval value : 'a t -> 'aval of_bool : bool -> unit tval iter : ('a -> unit) -> 'a t -> unit