What are the core principles of FP that JavaScript developers can use to make more understandable and reason-able code?
FUNCTIONAL-LIGHTJAVASCRIPTKYLE SIMPSON @GETIFY
View Slide
SIDE EFFECTS
PURE FUNCTIONS
COMPOSITION
IMMUTABILITY
CLOSURE
Closure is when a function"remembers" the variables aroundit even when that function isexecuted elsewhere.
RECURSION
PTCPROPER TAIL CALLS
LISTSIf you can do something awesome,keep doing it repeatedly.
MAP: TRANSFORMATION
FILTER: EXCLUSION
REDUCE: COMBINING
FUSION
TRANSDUCE
RECAP:‣ Pure Functions (side effects)‣ Composition‣ Immutability‣ Closure‣ Recursion‣ Lists (map, filter, reduce) (fusion, transducing)