January 2020
Intermediate to advanced
470 pages
11h 13m
English
In this section, we'll consider some higher-order functions that provide a wrapper around other functions to enhance them in some way but without altering their original objective. In terms of design patterns (which we'll be revisiting in Chapter 11, Implementing Design Patterns – The Functional Way), we can also speak of decorators. This pattern is based on the concept of adding some behavior to an object (in our case, a function) without affecting other objects. The term decorator is also popular because of its usage in frameworks such as Angular or (in an experimental mode) for general programming in JavaScript.
Read now
Unlock full access