Search:   Dictionary All Posts
Store Your Knowledge at the Brain Bank!

Function Composition

By Jamie in Lessons / Programming - JS  1.15.19  (Source)
Summary - A function that returns the result of another function is using function composition.
A function returns the result of another function run on a passed in argument. 

Every time you chain a promise with thens and catches you are composing functions. The promise runs a function and returns a result, that result is passed to the next function, that result is passed to the next function, etc.

Every time you ever chain functions you are composing.