Skip to content

Commit

Permalink
Adaptation of .batch description; closes #2969
Browse files Browse the repository at this point in the history
  • Loading branch information
threadless-screw committed Jan 6, 2020
1 parent bdae66f commit 97053a7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions doc/Type/List.pod6
Expand Up @@ -1109,10 +1109,13 @@ Defined As:
multi method batch(Int:D $batch --> Seq)
multi method batch(Int:D :$elems --> Seq)
Returns a C<Seq> of the elements in batches of C<:$elems> or C<$batch>,
respectively. If the number of elements is not a multiple of C<$batch>, the
last batch may have less than C<$batch> elements, similar to
C<.rotor($batch, :partial)>.
Returns a sequence of lists, wherein each list with the exception of the last
one is guaranteed to comprise a number of elements equal to the batch size
specified by C<$batch> or C<$elems>, respectively. If the invocant has a number
of elements that is not an integer multiple of the batch size, the last list in
the returned sequence will contain any remaining elements and thus have less
than C<$batch> or C<$elems> elements. Accordingly, C<.batch($batch)> is
shorthand for C<.rotor($batch, :partial)>.
=head2 routine cross
Expand Down

0 comments on commit 97053a7

Please sign in to comment.