Module Note.S.Option

module Option: sig .. end
Option signals

val eq : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool
eq f derives an equality function on options using f for testing Some _.
val hold_value : 'a -> 'a option Note.signal -> 'a Note.signal
hold_value i s is the last Some _ value of s or i if there was no such value: Uses s's equality on Some _.

Lifted Stdlib.Option module


val none : 'a option Note.signal
none is const None.
val some : 'a Note.signal -> 'a option Note.signal
some s is map (fun v -> Some v) s and uses s's equality function to derive the obvious one on options.
val value : 'a option Note.signal -> default:'a Note.signal -> 'a Note.signal
value s ~default is default when s is None: default's equality function is used for the resulting signal.
val get : ?eq:('a -> 'a -> bool) -> 'a option Note.signal -> 'a Note.signal
get s is map ~eq Option.get s.
val bind : ?eq:('b option -> 'b option -> bool) ->
'a option Note.signal -> ('a -> 'b option) -> 'b option Note.signal
bind ~eq s f is map ~eq (fun v -> Option.bind v f) s.
val join : ?eq:('a option -> 'a option -> bool) ->
'a option option Note.signal -> 'a option Note.signal
join ~eq oos is map ~eq Option.join oos.
val map : ?eq:('b option -> 'b option -> bool) ->
('a -> 'b) -> 'a option Note.signal -> 'b option Note.signal
map ~eq f s is map ~eq Option.map s.
val is_none : 'a option Note.signal -> bool Note.signal
is_none s is map Option.is_none s.
val is_some : 'a option Note.signal -> bool Note.signal
is_some s is map Option.is_some s.