Submodules
Constants
Procedures
clone

Creates a shallow copy of the array a.

Arguments

a - [any]

Returns

[any]

collect

Collects all the elements from the iterator i into a new array. Make sure the passed iterator is finite if you want this procedure to return before the heat death of the universe.

Arguments

i - || -> ( #next any | #end any )

Returns

[any]

concat

Creates a new array by appending all elements of the array b to the end of the array a.

Arguments

a - [any]

b - [any]

Returns

[any]

iter

Creates a new iterator over the elements in a.

Arguments

a - [any]

Returns

|| -> ( #next any | #end unit | ... )

reversed

Creates a new array by reversing the order of the elements in a.

Arguments

a - [any]

Returns

[any]

sorted

Uses std::sort::quicksort to return a new sorted shallow copy of a sorted according to the comparison function comp (see std::sort::ascending and std::sort::descending). comp must be a function that takes two array elements a and b to compare, returning eiter a number that is less than zero (placing a at an index lower than b) or a number that is greater than zero (placing a at an index higher than b).

Arguments

a - [any]

comp - |any, any| -> (int | float)

Returns

[any]

subarray

Returns a part of the array a, starting at the index start and including all elements up to the index (not including) end. If start or end are negative, the length of a is added to them.

Arguments

a - [any]

start - int

end - int

Returns

[any]

subarray_after

Returns a part of the array a, including all elements at and after the index start_index. If start_index is negative, the length of a is added to it.

Arguments

a - [any]

start_index - int

Returns

[any]

subarray_until

Returns a part of the array a, including all elements up to the index (not including) end_index. If end_index is negative, the length of a is added to it.

Arguments

a - [any]

end_index - int

Returns

[any]