Module Bonsai.Map

module type Comparator = Bonsai_types.Comparator
type ('k, 'cmp) comparator = ('k'cmp) Bonsai_types.comparator
val assoc_input : ('key'cmp) comparator -> ('data'result) t -> (('key'data'cmp) Base.Map.t('key'result'cmp) Base.Map.t) t

Transforms a component into a new component whose input and result are maps.

val associ_input : ('key'cmp) comparator -> ('key * 'data'result) t -> (('key'data'cmp) Base.Map.t('key'result'cmp) Base.Map.t) t

Transforms a component into a new component whose input and result are maps. The input for the transformed component also receives its key as an input.

val associ_input_with_extra : ('key'cmp) comparator -> ('key * 'data * 'input'result) t -> (('key'data'cmp) Base.Map.t * 'input('key'result'cmp) Base.Map.t) t
val merge : ('input('k'r1'cmp) Base.Map.t) t -> ('input('k'r2'cmp) Base.Map.t) t -> f:(key:'k -> [ `Both of 'r1 * 'r2 | `Left of 'r1 | `Right of 'r2 ] -> 'result option) -> ('input('k'result'cmp) Base.Map.t) t

Given two components that produce maps, create a new component that produces a map that is merged according provided function f.