package opam-core

  1. Overview
  2. Docs
val map : ('a -> 'b) -> 'a option -> 'b option
val iter : ('a -> unit) -> 'a option -> unit
val default : 'a -> 'a option -> 'a
val default_map : 'a option -> 'a option -> 'a option
val replace : ('a -> 'b option) -> 'a option -> 'b option
val map_default : ('a -> 'b) -> 'b -> 'a option -> 'b
val compare : ('a -> 'a -> int) -> 'a option -> 'a option -> int
val equal : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool
val to_string : ?none:string -> ('a -> string) -> 'a option -> string
val to_list : 'a option -> 'a list
val some : 'a -> 'a option
val none : 'a -> 'b option
val of_Not_found : ('a -> 'b) -> 'a -> 'b option

of_Not_found f x calls f x, catches Not_found and returns None

module Op : sig ... end
OCaml

Innovation. Community. Security.