zena:immutable-array
zena
import {…} from 'zena:immutable-array';
Classes
ImmutableArray
zena
final extension class ImmutableArray<T> with IterableUtils<T> implements Array<T>
Properties
zena
length: i32
Methods
zena
map<U>(f: (item: T, index: i32, seq: ImmutableArray<T>) => U): FixedArray<U>
Operators
zena
operator [](index: i32): T
6 inherited members
From
Iterable
zena
contains(value: T): boolean
Returns true if the collection contains the specified value.
zena
all(predicate: (item: T) => boolean): boolean
Returns true if all elements match the given predicate. Returns true if the collection is empty.
zena
some(predicate: (item: T) => boolean): boolean
Returns true if at least one element matches the given predicate. Returns false if the collection is empty.
zena
fold<R>(initial: R, combine: (acc: R, item: T) => R): R
Reduces the collection to a single value by accumulating state.
zena
find(predicate: (item: T) => boolean): inline (true, T) | inline (false, _)
Finds the first element that matches the predicate. Returns an inline tuple (true, item) if found, or (false, _) if not.
zena
filter(predicate: (item: T) => boolean): Iterable<T>
Returns a new iterable containing only the elements that match the predicate.