Message from JavaScript discussions

December 2017

— Heh, left-to-right?

— 

const compose = (...funcs) =>
initialValue =>
funcs.reduce((value, func) =>
func(value), initialValue);

— This

— 

myMath = compose(add(3), multiply(4));

myMath(2); // 20

— I prefer it but there is also another reduce function builtin that goes the other way

— And yes I'm aware of returning a function, the alternative being wrapping it in your own

— 

const compose = (...funcs) =>
initValue =>
funcs.reduce((value, func) => func(value), initValue);

there

Message permanent page

— Yes

— Better

— Kek

— What are nomadic function ..., can someone help me with a simple explanation

— Yes // Nope // No