Returns and passing in functions and nested functions