*. (spread method) operator
The spread method operator maps an iterable of instances through a method, resulting in a new iterable containing the return values of each method invocation.
Usage
{String+} names = {"foo", "bar", "baz"};
{String+} initials = names*.initial(1);
Description
Implementation
You can also spread method references:
Callable<String[], [Integer]> ref = names*.initial;
Definition
See the language specification for more details.
Polymorphism
The *. operator is not polymorphic.
See also
*.(spread attribute) operator, the equivalent of the spread method operator but for attributes;- sequence operators in the language specification
- operator precedence in the language specification
- Operator polymorphism in the Tour of Ceylon