package base

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Applicative.Of_monadSource

Every monad is Applicative via:

  let apply mf mx =
    mf >>= fun f ->
    mx >>| fun x ->
    f x

Parameters

module M : Monad.S

Signature

Sourceval return : 'a -> 'a M.t
Sourceval map : 'a M.t -> f:('a -> 'b) -> 'b M.t
Sourceval both : 'a M.t -> 'b M.t -> ('a * 'b) M.t
Sourceval (<*>) : ('a -> 'b) M.t -> 'a M.t -> 'b M.t

same as apply

Sourceval (<*) : 'a M.t -> unit M.t -> 'a M.t
Sourceval (*>) : unit M.t -> 'a M.t -> 'a M.t
Sourceval (>>|) : 'a M.t -> ('a -> 'b) -> 'b M.t
Sourceval apply : ('a -> 'b) M.t -> 'a M.t -> 'b M.t
Sourceval map2 : 'a M.t -> 'b M.t -> f:('a -> 'b -> 'c) -> 'c M.t
Sourceval map3 : 'a M.t -> 'b M.t -> 'c M.t -> f:('a -> 'b -> 'c -> 'd) -> 'd M.t
Sourceval all : 'a M.t list -> 'a list M.t
Sourceval all_unit : unit M.t list -> unit M.t
Sourcemodule Applicative_infix : sig ... end
OCaml

Innovation. Community. Security.