package olmi

  1. Overview
  2. Docs

Provide the signatures of all infix operators (linked to a Monad)

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

Sequential application.

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

infix alias of fmap

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

Replace all locations in the input with the same value.

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

Sequence actions, discarding the value of the first argument.

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

Sequence actions, discarding the value of the second argument.

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

A variant of <*> with the arguments reversed.

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

Sequentially compose two actions, passing any value produced by the first as an argument to the second.

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

infix alias of fmap

val (<=<) : ('b -> 'c t) -> ('a -> 'b t) -> 'a -> 'c t

Right-to-left Kleisli composition of monads. (>=>), with the arguments flipped

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

Left-to-right Kleisli composition of monads.

val (=<<) : ('a -> 'b t) -> 'a t -> 'b t

Flipped version of >>=

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

Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.

OCaml

Innovation. Community. Security.