Reduce (Composing Software)
Eric Elliott
2.2K20

Curious why you would implement pipe as (...fns) => x => fns.reduce((v,f)=>f(v), x)rather than (...fns) => fns.reduce((v,f)=>x=>f(v(x)))or, more generically, (...fns) => fns.reduce((v,f)=>(...args)=>f(v(...args))) ?

Like what you read? Give Dan Culley a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.