Functions in Limbo serve the same purpose as they do in other structured, procedural languages-they contain the statements that are executed when the program runs.
The general form of a Limbo function is:
Thefunction_name
(arguments
) :return_type
{statements
}
arguments
is a comma-separated list of variable names and their associated types that are passed to the function when it is called. A function is not required to have parameters, but it still must have the parentheses.
The return_type
specifies the type of data that the function returns. A function may return any type. A function is not required to return data, and the Limbo compiler does not assume a return result.