BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2024-08-04

class RaceSeq

Performs batches of work in parallel without respecting original order.

class RaceSeq does Iterable does Sequence { }
Code

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.

Methods§

method iterator§

method iterator(RaceSeq:D: --> Iterator:D)
Code

Returns the underlying iterator.

method grep§

method grep(RaceSeq:D: $matcher, *%options)
Code

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 ...)␤»
Code

When you use race on a Seq, this is the method that is actually called.

method map§

method map(RaceSeq:D: $matcher, *%options)
Code

Uses maps on the RaceSeq, generally created by application of .race to a preexisting Seq.

method invert§

method invert(RaceSeq:D:)
Code

Inverts the RaceSeq created from a Seq by .race.

method race§

method race(RaceSeq:D:)
Code

Returns the object.

method hyper§

method hyper(RaceSeq:D:)
Code

Creates a HyperSeq object out of the current one.

method serial§

multi method serial(RaceSeq:D:)
Code

Converts the object to a Seq and returns it.

method is-lazy§

method is-lazy(--> False )
Code

Returns False.

method sink§

method sink(--> Nil)
Code

Sinks the underlying data structure, producing any side effects.

Class relation diagram§

Rakudo Type Relation for RaceSeq RaceSeq RaceSeq Any Any RaceSeq->Any is ParallelSequence ParallelSequence RaceSeq->ParallelSequence does