Performs batches of work in parallel without respecting original order.
class RaceSeq does Iterable does Sequence { }
A RaceSeq is the intermediate object used when race is invoked on a Seq. In general, it's not intended for direct consumption by the developer.
method iterator(RaceSeq:D: --> Iterator:D)
Returns the underlying iterator.
method grep(RaceSeq:D: $matcher, *%options)
Applies grep to the RaceSeq similarly to how it would do it on a Seq.
my @raced = (^10000).map(*²).race;
@raced.grep( * %% 3 ).say;
# OUTPUT: «(0 9 36 81 144 ...)»
When you use race on a Seq, this is the method that is actually called.
method map(RaceSeq:D: $matcher, *%options)
Uses maps on the RaceSeq, generally created by application of .race to a preexisting Seq.
method invert(RaceSeq:D:)
Inverts the RaceSeq created from a Seq by .race.
method race(RaceSeq:D:)
Returns the object.
method hyper(RaceSeq:D:)
Creates a HyperSeq object out of the current one.
multi method serial(RaceSeq:D:)
Converts the object to a Seq and returns it.
method is-lazy(--> False )
Returns False.
method sink(--> Nil)
Sinks the underlying data structure, producing any side effects.