How to functional compose transforms of objects via transducers
问题 Live code example I'm trying to learn transducers via egghead and I think I got it until we try to compose object transformation. I have an example below that doesn't work const flip = map(([k,v]) => ({[v]: k})); const double = map(([k,v]) => ({[k]: v + v})); seq(flip, {one: 1, two: 2}); /*?*/ {1: 'one', 2: 'two'} seq(double, {one: 1, two: 2}); /*?*/ {'one': 2, 'two: 4} but if I compose it fails: seq(compose(flip, double), {one: 1, two: 2}); /*?*/ {undefined: NaN} seq(compose(double, flip),