package bastet

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

Option is the equivalent of Maybe in Haskell for Ocaml

val (<.) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
val maybe : f:('a -> 'b) -> default:'b -> 'a option -> 'b
val getWithDefault : 'a -> 'a option -> 'a
module type MAGMA_F = functor (M : Interface.MAGMA) -> Interface.MAGMA with type t = M.t option
module type SEMIGROUP_F = functor (S : Interface.SEMIGROUP) -> Interface.SEMIGROUP with type t = S.t option
module type MONOID_F = functor (S : Interface.SEMIGROUP) -> Interface.MONOID with type t = S.t option

A MONOID only needs to be commutative with the empty element.

module type QUASIGROUP_F = functor (Q : Interface.QUASIGROUP) -> Interface.QUASIGROUP with type t = Q.t option
module type LOOP_F = functor (L : Interface.LOOP) -> Interface.LOOP with type t = L.t option

A LOOP only needs to be commutative with the empty element.

module type EQ_F = functor (E : Interface.EQ) -> Interface.EQ with type t = E.t option
module type ORD_F = functor (O : Interface.ORD) -> Interface.ORD with type t = O.t option
module type SHOW_F = functor (S : Interface.SHOW) -> Interface.SHOW with type t = S.t option
module type TRAVERSABLE_F = functor (A : Interface.APPLICATIVE) -> Interface.TRAVERSABLE with type 'a t = 'a option and type 'a applicative_t = 'a A.t
module Functor : Interface.FUNCTOR with type 'a t = 'a option
module Apply : Interface.APPLY with type 'a t = 'a option
module Applicative : Interface.APPLICATIVE with type 'a t = 'a option
module Monad : Interface.MONAD with type 'a t = 'a option
module Magma : MAGMA_F
module Semigroup (S : Interface.SEMIGROUP) : sig ... end
module Monoid : MONOID_F

A MONOID only needs to be commutative with the empty element.

module Loop : LOOP_F

A LOOP only needs to be commutative with the empty element.

module Alt : Interface.ALT with type 'a t = 'a option
module Plus : Interface.PLUS with type 'a t = 'a option
module Alternative : Interface.ALTERNATIVE with type 'a t = 'a option
module Foldable : Interface.FOLDABLE with type 'a t = 'a option
module Traversable (A : Interface.APPLICATIVE) : sig ... end
module Eq : EQ_F
module Ord : ORD_F
module Show : SHOW_F
module Infix : sig ... end
OCaml

Innovation. Community. Security.