package monadlib

  1. Overview
  2. Docs

LazyPlus provides a plus operation which is non-strict in its second argument.

include Base
type 'a m
val return : 'a -> 'a m
val ap : ('a -> 'b) m -> 'a m -> 'b 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.

OCaml

Innovation. Community. Security.