Prev: Error-Handling Expressions

Splicing

Whenever you are writing an argument list or a list constructor expression, you can splice a list value into the sequence of expressions by prepending a list expression with @. For instance, the following method returns ['foo, 4, 5, 6, 'quux]:

var a;

a = [4, 5, 6]; return ['foo, @a, 'quux];

You use the splicing operator to pass a message along with all of its arguments:

pass(@args);
The splicing operator is not listed in the operator precedence list (see Precedence). This is because it is meaningless to talk about, say, adding a spliced list to another value. Using the splicing operator never causes an ambiguity.