hope this makes sense. I had a list of objects like this:
const xs = [
{ foo: 2, bar: 2, baz: 3 },
{ qux: 1, bar: 0.5 },
{ foo: 3, bar: 2, qux: 4 },
]
that I wanted to turn into a single object, by passing a function to merge similar keys/values.