Node:Function definition syntax, Next:, Previous:Prefix and postfix functions, Up:Functions



Function definition syntax

A function definition has this general form:

:(positional_params name positional_params keyword_params)=body

Here name is the name of the function being defined; the first positional_params is the list of parameter specifiers for the left parameters; while the second positional_params together with the keyword_params is the list of parameter specifiers for the right parameters.

A positional_params is a list of positional_param, with one optional tuple_param.