Module Incr_select.Make
Parameters
Signature
module Incr : sig ... endval select_one : (module Core_kernel.Hashable.Common with type t = 'a) -> 'a Incr.t -> ('a -> bool Incr.t) Core_kernel.Staged.tselect_onelogically constructs a set of outputs such that exactly one is selected astrue(specifically the one that corresponds to the current value of the input), and the rest are false. The staged function is used for creating incrementals that contain the appropriate output value.
val select_one' : (module Core_kernel.Hashable.Common with type t = 'a) -> 'a option Incr.t -> ('a -> bool Incr.t) Core_kernel.Staged.tselect_one'is similar toselect_one, except you can decide to not make a choice (by choosingNone)
val select_one_value : (module Core_kernel.Hashable.Common with type t = 'a) -> default:'b -> ('a * 'b) Incr.t -> ('a -> 'b Incr.t) Core_kernel.Staged.tselect_one_valueis similar toselect_one, except you also get to specify the value it will take on instead of onlytrueandfalse.select_one h inputis equivalent to:select_one_value h ~default:false (let%map x = input in (x, true))
val select_one_value' : (module Core_kernel.Hashable.Common with type t = 'a) -> default:'b -> ('a * 'b) option Incr.t -> ('a -> 'b Incr.t) Core_kernel.Staged.tselect_one_value'is the same asselect_one_valueexcept if the input is None, then all outputs aredefault.
val select_many : (module Core_kernel.Hashable.Common with type t = 'a) -> 'a list Incr.t -> ('a -> bool Incr.t) Core_kernel.Staged.tselect_manyallows you to specify a group of outputs to be selected as true instead of just one.select_one h inputis equivalent to:select_many h (let%map x = input in [x])
val select_many_values : (module Core_kernel.Hashable.Common with type t = 'a) -> default:'b -> ('a * 'b) list Incr.t -> ('a -> 'b Incr.t) Core_kernel.Staged.tselect_many_valuesallows you specify a group of outputs to be selected and their corresponding values.This is the most general of these functions; all the others can be reduced to it.