Module Option


module Option: sig .. end
Provides some help functions that deals with the option type.
Author(s): : Phillip Heidegger

val maybe_tuppel : f:('a -> 'b -> 'c) ->
fa:('a -> 'c) -> fb:('b -> 'c) -> 'a option -> 'b option -> 'c option
Runs the given function on the two arguments, if both are not None. There are the four cases: None,None -> None None,Some e -> Some (f2 e) Some e,None -> Some (f1 e) Some e1, Some e2 -> Some (f e1 e2)
val maybe_cmp : ('a -> 'a -> int) -> 'a option -> 'a option -> int
Takes a compare function and returns a new one, that is able to deal with option values.
val maybe_equal : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool
Takes a compare function and returns a new one, that is able to deal with option values.
val maybe_string : ('a -> string) -> 'a option -> string
Takes a string_of function and returns a function that converts 'a option values into a string.
val bind : f1:('a -> bool option) -> f2:('b -> bool option) -> 'a -> 'b -> bool option
val doo : ('a -> 'b) -> 'a option -> 'b option