Note: information on this page refers to Ceylon 1.0, 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