NAME ^

src/classes/List.pir - Perl 6 List class and related functions

Methods ^

get_string() (vtable method)

Return the elements of the list joined by spaces.

ACCEPTS(topic)

elems()

Return the number of elements in the list.

unshift(ELEMENTS)

Prepends ELEMENTS to the front of the list.

keys()

Returns a List containing the keys of the List.

values()

Returns a List containing the values of the List.

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 List, replacing them with Undef. Returns a List 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 List 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