Higher Order Function is the idea that functions can be used as the input parameters to other functions, as well as functions can be returned from the function. It is a little harder to understand the latter, so we'll spend some more time talking about it.
The reason why we can do HOF is because our function can be stored in our variables.
A good way to think about functions is that they are just like any other variables types (like int, boolean, tuple). Just like how we can create new tuple by using the tuple notation ( my_tuple = (1, 2, 3)), we can also create a new function using the create function notation.
There are 2 main ways to create function, and in the following example, a variable named square is created, that 'holds' the function that is created.