Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

array

🌌array

array -- one-dimensional immutable array

create a cons cell for a list of this array starting at the given
index

create a list from this array

get a list of tuples indices and elements in this array

create a cons cell for a list of tuples of this array's indices and elements
starting at the given indices.

fold the elements of this array using the given monoid.

e.g., to sum the elements of an array of i32, use a.fold i32.sum

array -- one-dimensional immutable array

map the array to a new array applying function f to all elements

create a new array with element i set to v. Grow the array in case i == length.

Complexity: O(array.this.length)

reverse the order of the elements in this array

create a slice from this array's elements at index 'from' (included)
up to 'to' (excluded).

NYI: array.slice should better return an array containing a slice of
internalArray.

sort this array using total order defined by lessOrEqual

sort this array using total order defined for 'f a[i]'