Module Incr_select.Make
Parameters
Signature
module Incr : sig ... end- val select_one : (module Core_kernel.Hashable.Common with type t = 'a) -> 'a Incr.t -> ('a -> bool Incr.t) Core_kernel.Staged.t
- select_onelogically constructs a set of outputs such that exactly one is selected as- true(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.t
- select_one'is similar to- select_one, except you can decide to not make a choice (by choosing- None)
- 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.t
- select_one_valueis similar to- select_one, except you also get to specify the value it will take on instead of only- trueand- false.- 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.t
- select_one_value'is the same as- select_one_valueexcept if the input is None, then all outputs are- default.
- val select_many : (module Core_kernel.Hashable.Common with type t = 'a) -> 'a list Incr.t -> ('a -> bool Incr.t) Core_kernel.Staged.t
- select_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.t
- select_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.