package ocaml-basics

  1. Overview
  2. Docs

Parameters

module Backend : sig ... end

Signature

module Backend = Backend
type ('ok, 'err) t = ('ok, 'err) result Backend.t
module Monad : sig ... end
module Applicative : sig ... end
include module type of Monad.Core
val bind : ('a, 'b) t -> ('a -> ('c, 'b) t) -> ('c, 'b) t
val return : 'a -> ('a, _) t
include module type of Applicative.Core
val apply : ('a -> 'b, 'c) t -> ('a, 'c) t -> ('b, 'c) t
val map : ('a -> 'b) -> ('a, 'c) t -> ('b, 'c) t
val pure : 'a -> ('a, _) t
val traverse : ('a -> ('b, 'c) t) -> 'a list -> ('b list, 'c) t
val sequence : ('a, 'b) t list -> ('a list, 'b) t
val fold : ('a -> 'b -> 'a) -> 'a -> ('b, _) t -> 'a
module Infix : sig ... end
val choose : ('ok, 'err list) t list -> 'err -> ('ok, 'err list) t
val choose' : ('ok, string list) t list -> ('ok, string list) t
val error : 'err -> (_, 'err) t
OCaml

Innovation. Community. Security.