Note: information on this page refers to Ceylon 1.1, not to the current release.

*. (spread method) operator

The spread method operator maps an iterable of instances through a method, resulting in a new sequence containing the return values of each method invocation.


{String+} names = {"foo", "bar", "baz"};
{String+} initials = names*.initial(1);

You can also spread method references:

Callable<String[], [Integer]> ref = names*.initial;


See the language specification for more details.


The *. operator is not polymorphic.


The result type of the lhs*.rhs operator is the callable type of the type of the right hand operand, with the return type replaced by its corresponding sequential type.

See also