Package: effect
Module: Record
Creates a Reducer whose combine operation intersects two records and
combines values for keys present in both records.
When to use
Use to build a Reducer that combines records by retaining only keys shared
by both inputs and combining matching values with a Combiner.
Gotchas
The reducer’s initialValue is an empty record. Because intersection with
an empty record is empty, the default combineAll folds from {} and
therefore produces {} for ordinary non-empty inputs.
See
makeReducerUnion for a reducer that preserves keys from either input recordintersection for applying the shared-key merge to one pair of recordsSignature
declare const makeReducerIntersection: <K extends string, A>(combiner: Combiner.Combiner<A>) => Reducer.Reducer<Record<K, A>>
Since v4.0.0