Summary#
Well done making it this far! After going through this section, you should be comfortable with some key ideas, like:
the fact that functions can accept other functions as arguments;
functions can be defined inside other functions;
functions can return other functions; and
closures are like bubbles that allow inner functions to access variables that were inside the outer function, but outside the inner function.
What is even more amazing is that if you really understood everything so far, you already know decorators. Maybe you don’t know you know them, but you already know them.
The next step is to close this loop, so you are about to understand how the factories you wrote are decorators already.
If you have any feedback, reach out to me at rodrigo@mathspp.com.