const composeM = method => (...ms) => ( ms.reduce((f, g) => x => g(x)[method](f)) );
JavaScript Monads Made Simple
Eric Elliott
5.7K23

Where is the initial value of reduce ? This will not work because as first `f` you will not get what you expect. I tried it in several contexts and it does not work

Like what you read? Give Danielo Rodríguez a round of applause.

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