Your first decorator

Your first decorator#

Objectives#

In this section you will write your first decorator. And then you will understand you actually already wrote a decorator and you’ll be upset because this section should be called “Your fourth decorator”, or something like that.

Pre-requisites#

For this section, it’s assumed you’re comfortable with manipulating functions as regular objects:

  • functions can be arguments to other functions;

  • functions can be defined inside other functions; and

  • functions can be returned from othe functions.

You should also have an intuitive understading of what a “closure” is.