T M
class HyperSeq
Error ReportCollection examples

An object for performing batches of work in parallel with ordered output

class HyperSeq does Iterable does Sequence { }

An HyperSeq is the intermediate object used when hyper is invoked on a Seq. In general, it's not intended for direct consumption by the developer.

Methods

method iterator

method iterator(HyperSeq:D: --> Iterator:D)

Returns the underlying iterator.

method grep

method grep(HyperSeq:D: $matcher*%options)

Applies grep to the HyperSeq similarly to how it would do it on a Seq.

my @hyped = (^10000).map(*²).hyper;
@hyped.grep* %% 3 ).say;
# OUTPUT: «(0 9 36 81 144 ...)» 

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

method map

method map(HyperSeq:D: $matcher*%options)

Uses maps on the HyperSeq, generally created by application of hyper to a preexisting Seq.

method invert

method invert(HyperSeq:D:)

Inverts the HyperSeq created from a Seq by .hyper.

method hyper

method hyper(HyperSeq:D:)

Returns the object.

method race

method race(HyperSeq:D:)

Creates a RaceSeq object out of the current one.

method serial

multi method serial(HyperSeq:D:)

Converts the object to a Seq and returns it.

method is-lazy

method is-lazy(--> False )

Returns False.

method sink

Defined as:

method sink(--> Nil)

Sinks the underlying data structure, producing any side effects.