package mopsa

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

Utility functions for 'a option type.

val absorb : ('a -> 'b option) -> 'a option -> 'b option
val absorb2 : ('a -> 'b -> 'c option) -> 'a option -> 'b option -> 'c option
val neutral2 : ('a -> 'a -> 'a) -> 'a option -> 'a option -> 'a option
val merge : ('b -> 'a) -> ('c -> 'a) -> ('b -> 'c -> 'a) -> 'a -> 'b option -> 'c option -> 'a
val equal : ('a -> 'b -> bool) -> 'a option -> 'b option -> bool
val included : ('a -> 'b -> bool) -> 'a option -> 'b option -> bool
val apply : ('b -> 'a) -> 'a -> 'b option -> 'a
val apply2 : ('a -> 'b -> 'c) -> 'c -> 'a option -> 'b option -> 'c
val default : 'a -> 'a option -> 'a
val compare : ('a -> 'a -> int) -> 'a option -> 'a option -> int
exception Found_None
val raise_none : unit -> 'a
val catch_none : 'b -> ('a -> 'b) -> 'a -> 'b
val none_to_exn : 'a option -> 'a
val exn_to_none : ('a -> 'b) -> 'a -> 'b option
val print : ?none:string -> ?some:string -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a option -> unit
val return : 'a -> 'a option
val bind : ('a -> 'b option) -> 'a option -> 'b option
val lift : ('a -> 'b) -> 'a option -> 'b option
val lift2 : ('a -> 'b -> 'c) -> 'a option -> 'b option -> 'c option
val lift_list : 'a option list -> 'a list option
OCaml

Innovation. Community. Security.