package spotlib

  1. Overview
  2. Docs
include Monad.Infix with type 'a t := 'a option
val (>>=) : 'a option -> ('a -> 'b option) -> 'b option

synonym of bind

val (>>|) : 'a option -> ('a -> 'b) -> 'b option

synonum of fmap, with the flipped arguments

val (>|=) : 'a option -> ('a -> 'b) -> 'b option

synonum of fmap, with the flipped arguments

Applicative style binops

val (^<$>) : ('a -> 'b) -> 'a option -> 'b option

same as map, <$> in Haskell

val (/<*>) : ('a -> 'b) option -> 'a option -> 'b option

<*> in Haskell

val (>>=!) : 'a option -> (unit -> 'a option) -> 'a option
val (//) : 'a t -> 'a -> 'a

Same as default but the default value is always evaluated

OCaml

Innovation. Community. Security.