package monadlib

  1. Overview
  2. Docs

MonadPlus library.

Parameters

module M : BasePlus

Signature

include Monad with type 'a m = 'a M.m
include BatInterfaces.Monad with type 'a m = 'a M.m
type 'a m = 'a M.m

The type of a monad producing values of type 'a.

val bind : 'a m -> ('a -> 'b m) -> 'b m

Monadic binding.

bind m f executes first m then f, using the result of m.

include Applicative.Applicative with type 'a m := 'a m
include Applicative.Base with type 'a m := 'a m
val return : 'a -> 'a m
val ap : ('a -> 'b) m -> 'a m -> 'b m
val lift1 : ('a -> 'b) -> 'a m -> 'b m
val lift2 : ('a -> 'b -> 'c) -> 'a m -> 'b m -> 'c m
val lift3 : ('a -> 'b -> 'c -> 'd) -> 'a m -> 'b m -> 'c m -> 'd m
val sequence : 'a m list -> 'a list m
val (>>=) : 'a m -> ('a -> 'b m) -> 'b m
val join : 'a m m -> 'a m
val zero : unit -> 'a m
val plus : 'a m -> 'a m -> 'a m
val null : 'a m -> bool
val filter : ('a -> bool) -> 'a m -> 'a m
val of_list : 'a list -> 'a m
val mconcat : 'a m list -> 'a m
OCaml

Innovation. Community. Security.