Lists#
Lists in CEL are ordered collections of values.
Literals#
Create lists using square brackets.
Lists can contain heterogeneous types.
Lists can be nested.
Size#
size() returns the number of elements.
Both function and method syntax are supported.
Indexing#
Access elements by index using square brackets. Indices start at zero.
Out-of-bounds access produces a runtime error.
Nested lists use chained indexing.
Membership#
The in operator checks if an element exists in a list.
Concatenation#
The + operator joins lists together.
Comparison#
Lists support equality comparison. Two lists are equal if they have the same elements in the same order.
See also#
- Comparison operators - List equality