Documentation for method list, assembled from the following types:
method list(--> List)
Interprets the invocant as a list, and returns that List.
say 42.list.^name; # OUTPUT: «List␤»say 42.list.elems; # OUTPUT: «1␤»
method list(Capture: --> Positional)
Returns the positional part of the Capture.
my Capture = \(2, 3, 5, apples => (red => 2));say .list; # OUTPUT: «(2 3 5)␤»
method list(Channel: --> List)
Seq which will iterate items in the queue and removes each item from the queue as it iterates. This can only terminate once the
close method has been called.
my = Channel.new; .send(1); .send(2);.close;say .list; # OUTPUT: «(1 2)␤»
Returns a list of positional submatches.
method list(PositionalBindFailover: --> List)
Returns a List based on the
iterator method without caching it.
method list(Range: --> List)
Generates the list of elements that the range represents.
say (1..5).list; # OUTPUT: «(1 2 3 4 5)␤»say (1^..^5).list; # OUTPUT: «(2 3 4)␤»
method list(Supply: --> List)
Supply it is called on, and returns a lazy list that will be reified as the
Supply emits values. The list will be terminated once the
done. If the
quits, then an exception will be thrown once that point in the lazy list is reached.