There are several common coding patterns that actually take advantage of FP style, even if you weren't aware of it. In this section, we will go through them and look at the functional aspects of the code so that you can get more accustomed to this coding style.
Then, we'll look in detail at using functions in an FP way by considering several FP techniques, such as the following:
- Injection, which is needed for sorting different strategies, as well as other uses
- Callbacks and promises, introducing the continuation-passing style
- Polyfilling and stubbing
- Immediate invocation schemes