Functions can be accepted as parameters and can also be produced as return types. Indeed, functions can be created inside the body of other functions. These inner functions are known as closures.