package ocaml-basics

  1. Overview
  2. Docs
module type S = sig ... end
module Make (Accu : sig ... end) : S with module Accu = Accu
module ListMonoid : sig ... end
include sig ... end
module Accu : sig ... end
module Monad : sig ... end
module Applicative : sig ... end
type (!'ok, !'err) t = ('ok, 'err) result =
  1. | Ok of 'ok
  2. | Error of 'err
val t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> (Sexplib0.Sexp.t -> 'b) -> Sexplib0.Sexp.t -> ('a, 'b) t
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> ('b -> Sexplib0.Sexp.t) -> ('a, 'b) t -> Sexplib0.Sexp.t
val bind : ('a, 'b) Monad.t -> ('a -> ('c, 'b) Monad.t) -> ('c, 'b) Monad.t
val return : 'a -> ('a, 'b) Monad.t
val apply : ('a -> 'b, 'c) Applicative.t -> ('a, 'c) Applicative.t -> ('b, 'c) Applicative.t
val map : ('a -> 'b) -> ('a, 'c) Applicative.t -> ('b, 'c) Applicative.t
val pure : 'a -> ('a, 'b) Applicative.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, 'c) t -> 'a
val choose : ('ok, 'err Accu.t) t -> ('ok, 'err Accu.t) t -> ('ok, 'err Accu.t) t
val get_ok : default:'a -> ('a, 'b) t -> 'a
module Infix : sig ... end
OCaml

Innovation. Community. Security.