The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Compose functions with reduce

Compose functions with reduce

8:19
Javascript has first-class functions which means that any function can stored, passed around, and returned just like an Object can. This allows for a lot of flexibility with how you call functions. This allows us to use array reduction to create functional pipelines by composing arrays of functions.
Watch this lesson now
Avatar
egghead.io

Learn how to use array reduction to create functional pipelines by composing arrays of functions.

Avatar
Andreas

Cool!
Seems like there is either a problem with the jsBin link or the code is missing

Avatar
dan entous

excellent explanation. one possible improvement to get across the transition from the initial program to the composition program: have the transform function use the initial program’s functions instead of hardcoding the math in it; e.g. return decrement( double( increment( input ) ) );

Avatar
peterschussheim

Great video Mykola! thanks

Avatar
Jack

This is so cool man!
thanks

Avatar
joyfeel

Very helpful!

Avatar
Mike

Nicely explained.

Avatar
Johan

So simple and yet so powerful ! Great !

In reply to egghead.io
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?