Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Writes all methods for HyperSeq, refs #1897
  • Loading branch information
JJ committed Jul 26, 2019
1 parent 409249f commit a305a94
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions doc/Type/HyperSeq.pod6
Expand Up @@ -20,6 +20,50 @@ it's not intended for direct consumption by the developer.
Returns the underlying iterator.
=head2 method grep
method grep(HyperSeq:D: $matcher, *%options)
Applies C<grep> to the C<HyperSeq> similarly to how it would do it on a Seq.
=for code
my @hyped = (^10000).map(*²).hyper;
@hyped.grep( * %% 3 ).say;
# OUTPUT: «(0 9 36 81 144
When you use C<hyper> on a C<Seq>, this is the method that is actually called.
=head2 method map
method map(HyperSeq:D: $matcher, *%options)
Uses maps on the C<HyperSeq>, generally created by application of C<hyper> to
a preexisting C<Seq>.
=head2 method invert
method invert(HyperSeq:D:)
Inverts the C<HyperSeq> created from a C<Seq> by C<.hyper>.
=head2 method hyper
method hyper(HyperSeq:D:)
Returns the object.
=head2 method race
method race(HyperSeq:D:)
Creates a C<RaceSeq> object out of the current one.
=head2 method serial
multi method serial(HyperSeq:D:)
Converts the object to a C<Seq> and returns it.
=head2 method is-lazy
method is-lazy(--> False )
Expand Down

0 comments on commit a305a94

Please sign in to comment.