Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Optional elements of a certain type.
val return : 'a -> 'a t
return a
Equivalent to Some a
.
val fail : 'a t
Equivalent to None
.
Chaining of operations which return optional elements.
Example:
let* a = op1 ... in (* 'op1 ... ' returns an optional element *)
let* b = op2 ... in
let* c = op3 ... in
...
return (f a b c ...)
val to_list : 'a t -> 'a list
to_list a
Returns a one element list or an empty list.