11. Pure Function
Pure functions act on their parameters
Are not efficient if not returning
anything
Will always produce the same output
for the given parameters
Have NO side affects
43. Map
Creates a new array with the results
of calling a provided function on
every element in the array
44.
45. Filter
Creates a new array with all
elements that pass the test
implemented by the provided
function
46.
47. Reduce
Applies a function against an
accumulator and each value of the
array (from left-to-right) to reduce
it to a single value
48.
49. Summary
Use “Pure” functions to create predictable &
stable code
Use Immutable structs to avoid side effects
Compose complex functionality from simple
building blocks
Use currying for simple composition
Avoid “boilerplate” code and loops by using
functional functions