zena:array

zena
import {…} from 'zena:array';

Interfaces

Array

zena
interface Array<T> extends Iterable<T>
Extends Iterable<T>
Properties
zena
length: i32 { get; }
#
Methods
zena
map<U>(f: (item: T, index: i32, seq: this) => U): Array<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.

MutableArray

zena
interface MutableArray<T> extends Array<T>
Extends Array<T>
Operators
zena
operator []=(index: i32, value: T): void
#
9 inherited members
From Array
Properties
zena
length: i32 { get; }
#
Methods
zena
map<U>(f: (item: T, index: i32, seq: this) => U): Array<U>
#
Operators
zena
operator [](index: i32): T
#
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.