Note: information on this page refers to Ceylon 1.2, not to the current release.
*.
(spread attribute) operator
The spread attribute operator maps an iterable of instances through an attribute, resulting in a sequence of the attribute values.
Usage
{String+} names = {"foo", "bar", "baz"};
[Integer+] sizes = names*.size;
Description
Definition
The *.
operator is defined by the comprehension:
[ for (X x in lhs) x.member ]
See the language specification for more details.
Polymorphism
The *.
operator is not polymorphic.
Type
The result type of the lhs*.rhs
operator is the sequential type of the
type of the right hand operand.
See also
-
*.
(spread invoke) operator, the equivalent of the spread attribute operator but for methods; - sequence operators in the language specification
- operator precedence in the language specification
- Operator polymorphism in the Tour of Ceylon