In the previous section, we considered some ways of wrapping functions so that they maintain their original functionality, even though they've been enhanced in some way. Now, we'll turn to modify what the functions do so that the new results will differ from the original function's ones.
We'll be covering the following topics:
- Revisiting the problem of having a function work, but just once
- Negating or inverting a function's result
- Changing the arity of a function
Let's get started!