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

marray

🌌marray

marray -- one-dimensional mutable array

create a new marray by adding a new element o at the end of this marray

create immutable array from this


redefines Sequence.asStream:
create a stream of T.

A stream contains mutable state, so it cannot be reused or shared
between threads.

Default implementation uses asList. Heirs must redefine at least
one of asList or asStream.

§fold(i i32, s T, m Monoid<marray.T>)
 => 
T
:
Object

fold the elements of this array using the given monoid and initial value

Used to fold an array tail-recursively

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

redefines Sequence.fold:
fold the elements of this Sequence using the given monoid.

e.g., to sum the elements of a stream of i32, use s.fold i32.sum

get element at given index i

set element at given index i to given value o

infix operator synonyme for add

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