Reduce Function Flashcards
1
Q
Reduce()
A
Apply a function to an iterable and reduce it to a single cumulative value
2
Q
How does the reduce function work?
A
Performs function on first two elements and repeats process until 1 value remains
3
Q
What are the parameters for the reduce function
A
Reduce(function, iterable)