4 reasons functions are first class
Functions are first class citizens. You've probably heard that before. Let's use our mental model to understand why.
1. We can treat function executions as values
Every time we execute a function we get a value back. This means we can work with them!
In the code alongside, we have assigned a variable to the result of an execution. We picture this as our genie isAuthenticated waiting patiently for the wormhole to turn into an island.
Another example of this is using the result inside the execution of another function:
createHtml( createHeader(), createBody(), createFooter() )
Each inner wormhole closes into an island first, and those islands become the arguments of createHtml.



