Kyle spends a few minutes answering audience questions. He then continues the solution to exercise 4 by using the map() method so an array of individual values can be passed to addn() as an array of functions.
- I apologize if it got a little muddy…because I started my brain down a different way…of solving this and I got you confused…so hopefully we backed up the stack enough to show this.…But the point that I want to get across is…that the expression with a reduce…and we could have taken care of this part with a map…but we chose to back that part out,…I was going too far down to the complication tree,…but a single reduce here replaces the complexities…of recursion or iteration for us.…
Just simply knowing how to use that tool.…It's like if you walk into a workshop…and I've got a hammer in one hand and a mallet in the other,…they both, fundamentally, can be used to swing things…and drive, you know, some nail looking object in…but you're going to use a mallet differently…than you're going to use a hammer.…You're going to use them for different kinds of nails.…So, that's the distinction that we're making here,…we're not talking about the difference…between a hammer and a screwdriver,…we're talking about the difference between…
This course was created by Frontend Masters. It was originally released on 03/08/2016. We're pleased to host this training in our library.
- Pure functions
- Manual composition
- Composition utility
- List operations
Skill Level Intermediate
1. Pure Functions
2. Composition and Immutability
3. Closure and Recursion
4. List Operations
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.