package spotlib

  1. Overview
  2. Docs
module M1 : sig ... end
include module type of M1
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
include Monad_intf.S1 with type 'a t := 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
include Monad_intf.EX1 with type 'a t := 'a 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

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

Not tail recursive

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

Iteration with index starting from 0. Not tail recursive.

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

for like iteration. Not tail recursive

val join : 'a t t -> 'a t
include Monad_intf.Infix1 with type 'a t := 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

synonym of bind

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

synonum of fmap, with the flipped arguments

Applicative style binops

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

same as map, <$> in Haskell

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

<*> in Haskell

module S : Monad_intf.S1 with type 'a t := 'a t
module EX : Monad_intf.EX1 with type 'a t := 'a t
module Infix : Monad_intf.Infix1 with type 'a t := 'a t
module M2 : sig ... end
OCaml

Innovation. Community. Security.