package monadlib

  1. Overview
  2. Docs
include BaseCollectionM
include BaseLazyPlus
include BatInterfaces.Monad
type 'a 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.

val zero : unit -> 'a m
val lplus : 'a m -> 'a m Stdlib.Lazy.t -> 'a m
val null : 'a m -> bool

null x implies that x is zero. If you do not want to or cannot answer whether a given x is zero, then null x should be false.

val difference : ('a -> 'a -> bool) -> 'a m -> 'a m -> 'a m
val unique : ('a -> 'a -> bool) -> 'a m -> 'a m
val maxima : ('a -> 'a -> bool) -> 'a m -> 'a m
val nub : ('a -> 'a -> bool) -> '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
OCaml

Innovation. Community. Security.