Example 1 — Official concatValues
Nested objects mix. values joins. thing keeps the right string.
const concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r;
R.mergeDeepWithKey(concatValues,
{ a: true, c: { thing: 'foo', values: [10, 20] } },
{ b: true, c: { thing: 'bar', values: [15, 35] } }
);
//=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] } } How It Works
The docs use == on the key. c is two objects, so it recurses before fn runs. That is the sample from ramdajs.com.
