package ocaml-basics

  1. Overview
  2. Docs
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
include Ppx_sexp_conv_lib.Sexpable.S2 with type ('ok, 'err) t := ('ok, 'err) t
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
include module type of Monad.Core
val bind : ('a, 'b) Monad.t -> ('a -> ('c, 'b) Monad.t) -> ('c, 'b) Monad.t
val return : 'a -> ('a, _) Monad.t
include module type of Applicative.Core
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, _) 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, _) 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, _) t -> 'a
module Infix : sig ... end
OCaml

Innovation. Community. Security.