NAME ^

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

Methods ^

ACCEPTS
Smart-matches against the list.
item
A List in item context becomes an Array.
list
A List in list context returns itself.

Coercion methods ^

Iterator
Scalar
A list in Scalar context becomes a Scalar containing an Array.
ResizablePMCArray.list
This version of list morphs a ResizablePMCArray into a List.

Methods ^

elems()
Return the number of elements in the list.
perl()
Returns a Perl representation of a List.

Private methods ^

!flatten()
Flatten the invocant, as in list context. This doesn't necessarily make the list eager, it just brings any nested Lists to the top layer. It will likely change substantially when we have lazy lists.
fmt
 our Str multi List::fmt ( Str $format, $separator = ' ' )
Returns the invocant list formatted by an implicit call to sprintf on each of the elements, then joined with spaces or an explicitly given separator.
iterator()
Returns an iterator for the list.
uniq(...)

Functions ^

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.


parrot