NAME ^

src/classes/CardinalArray.pir - Cardinal CardinalArray class and related functions Stolen from Rakudo

Methods ^

get_string() (vtable method)

Return the elements of the list joined by spaces.

clone() (vtable method)

Clones the list.

ACCEPTS(topic)

elems()

Return the number of elements in the list.

unshift(ELEMENTS)

Prepends ELEMENTS to the front of the list.

keys()

Returns a CardinalArray containing the keys of the CardinalArray.

values()

Returns a CardinalArray containing the values of the CardinalArray.

shift()

Shifts the first item off the list and returns it.

pop()

Treats the list as a stack, popping the last item off the list and returning it.

push(ELEMENTS)

Treats the list as a stack, pushing ELEMENTS onto the end of the list. Returns the new length of the list.

join(SEPARATOR)

Returns a string comprised of all of the list, separated by the string SEPARATOR. Given an empty list, join returns the empty string.

reverse()

Returns a list of the elements in revese order.

delete()

Deletes the given elements from the CardinalArray, replacing them with Undef. Returns a CardinalArray of removed elements.

exists(INDEX)

Checks to see if the specified index or indices have been assigned to. Returns a Bool value.

kv()

pairs()

grep(...)

first(...)

Functions ^

list(...)

Build a CardinalArray from its arguments.

infix:,(...)

Operator form for building a list from its arguments.

infix:Z(...)

The zip operator.

infix:X(...)

The non-hyper cross operator.

infix:min(...)

The min operator.

infix:max(...)

The max operator.

reverse(LIST)

Returns the elements of LIST in the opposite order.


parrot