package archetype

  1. Overview
  2. Docs
val is_none : 'a option -> bool
val is_some : 'a option -> bool
val none : 'a option
val some : 'a -> 'a option
val to_list : 'a option -> 'a list
val get : 'a option -> 'a
val get_all : 'a option list -> 'a list option
val get_exn : exn -> 'a option -> 'a
val get_dfl : 'a -> 'a option -> 'a
val get_fdfl : (unit -> 'a) -> 'a option -> 'a
val get_list : 'a option list -> 'a list
val iter : ('a -> unit) -> 'a option -> unit
val map : ('a -> 'b) -> 'a option -> 'b option
val map2 : ('a -> 'b -> 'c) -> 'a option -> 'b option -> 'c option
val bind : ('a -> 'b option) -> 'a option -> 'b option
val fold : ('a -> 'b -> 'a) -> 'a -> 'b option -> 'a
val foldmap : ('a -> 'b -> 'a * 'c) -> 'a -> 'b option -> 'a * 'c option
val foldbind : ('a -> 'b -> 'a * 'c option) -> 'a -> 'b option -> 'a * 'c option
val map_dfl : ('a -> 'b) -> 'b -> 'a option -> 'b
val get_as_list : 'a option -> 'a list
val flatten : 'a option option -> 'a option
val cmp : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool
val fst : ('a * 'b) option -> 'a option
val snd : ('a * 'b) option -> 'b option
OCaml

Innovation. Community. Security.