NAME ^

src/classes/List.pir - Perl 6 List class

Methods ^

get_string() (vtable method)

Return the elements of the list joined by spaces.

elems()

Return the number of elements in the list.

unshift(ELEMENTS)

Prepends ELEMENTS to the front 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.


parrot