package climate

  1. Overview
  2. Docs
include module type of Stdlib.Option
type !'a t = 'a option =
  1. | None
  2. | Some of 'a
val none : 'a option
val some : 'a -> 'a option
val value : 'a option -> default:'a -> 'a
val get : 'a option -> 'a
val join : 'a option option -> 'a option
val fold : none:'a -> some:('b -> 'a) -> 'b option -> 'a
val is_none : 'a option -> bool
val is_some : 'a option -> bool
val compare : ('a -> 'a -> int) -> 'a option -> 'a option -> int
val to_result : none:'e -> 'a option -> ('a, 'e) Stdlib.result
val to_list : 'a option -> 'a list
val to_seq : 'a option -> 'a Stdlib.Seq.t
val map : 'a t -> f:('a -> 'b) -> 'b t
val bind : 'a t -> f:('a -> 'b t) -> 'b t
val iter : 'a t -> f:('a -> unit) -> unit
val equal : 'a t -> 'a t -> eq:('a -> 'a -> bool) -> bool
OCaml

Innovation. Community. Security.