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

EditButtonTip 2024-08-04

class HyperSeq

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

class HyperSeq does Iterable does Sequence { }
Code

A 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)
Code

Returns the underlying iterator.

method grep§

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

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

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

method map§

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

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

method invert§

method invert(HyperSeq:D:)
Code

Inverts the HyperSeq created from a Seq by .hyper.

method hyper§

method hyper(HyperSeq:D:)
Code

Returns the object.

method race§

method race(HyperSeq:D:)
Code

Creates a RaceSeq object out of the current one.

method serial§

multi method serial(HyperSeq: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 HyperSeq HyperSeq HyperSeq Any Any HyperSeq->Any is ParallelSequence ParallelSequence HyperSeq->ParallelSequence does