CCOption.Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
o >|= f is map f o.
o >|= f
map f o
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
o >>= f is the monadic bind.
o >>= f
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
f <*> o returns Some (f x) if o is Some x and None if o is None.
f <*> o
Some (f x)
o
Some x
None
val (<$>) : ('a -> 'b) -> 'a t -> 'b t
f <$> o is like map f o.
f <$> o
val (<+>) : 'a t -> 'a t -> 'a t
o1 <+> o2 is o1 if o1 is Some _, o2 if o1 is None.
o1 <+> o2
o1
Some _
o2
val (|?>) : 'a -> ('a -> 'a t) -> 'a
x |?> f is apply_or f x
x |?> f
apply_or f x
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
val (>=>) : ('a -> 'b t) -> ('b -> 'c t) -> 'a -> 'c t
Monadic k_compose.
k_compose
val (<=<) : ('b -> 'c t) -> ('a -> 'b t) -> 'a -> 'c t
Reverse monadic k_compose.