Previous page Table of Contents Next page
The arguments in a function call are a comma-separated list of expressions.
To increase the readability of a call to a function that has keyword parameters, any argument expression can be preceded by a keyword. This becomes two arguments, the simple-name corresponding to the keyword and the value of the expression. The first argument typically selects the function parameter whose definition in the body of the function will be the second argument. Of course this syntax can be used in any function call, regardless of the parameter-list of the callee function.
In addition, any argument can be a sequence that is "spread" by the function call so that each element of the sequence becomes an individual argument. This is indicated by appending the particle ... to the argument expression.
The syntax could be defined by:
defparser argument-list { [ ?:keyword ] ?arg [ ??spread ... ] & ~^ , }* => ...
Previous page Table of Contents Next page