package spotlib

  1. Overview
  2. Docs
type +'a t =
  1. | Return : 'a -> 'a t
  2. | Bind : 'a t * ('a -> 'b t) -> 'b t
include Monad.T with type 'a t := 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
val fmap : ('a -> 'b) -> 'a t -> 'b t

fmap in Haskell

val liftM : ('a -> 'b) -> 'a t -> 'b t

synonym of fmap

val fmap2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

fmap2 in Haskell

val liftM2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

synonym of fmap2

val void : 'a t -> unit t
val seq : 'a t list -> 'a list t

sequence in Haskell. Not tail recursive.

val seq_ : unit t list -> unit t

sequence_ in Haskell. Not tail recursive.

val mapM : ('a -> 'b t) -> 'a list -> 'b list t

Not tail recursive by default

val mapM_ : ('a -> unit t) -> 'a list -> unit t

Not tail recursive by default

val iteri : (int -> 'a -> unit t) -> 'a list -> unit t

Iteration with index starting from 0. Not tail recursive by default

val for_ : int -> int -> (int -> unit t) -> unit t

for like iteration. Not tail recursive by default

val join : 'a t t -> 'a t
OCaml

Innovation. Community. Security.