A function is a subprogramme that works only when it is called. The data sent to the function are called parameters. The function may not have any parameters

The function can also be defined using the lambda instruction without giving it a name (anonymous function).

This is very convenient in function programming when another function is a parameter.

This function generates squares of numbers from 0 to 9. The standard function map as a result returns a list.

For the function to return a value, you can use the return instruction:.