Skip to content

Commit

Permalink
Reflow prior to #1720
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Jul 23, 2019
1 parent 6339327 commit 8e68d75
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/Type/Any.pod6
Expand Up @@ -250,7 +250,7 @@ Defined as:
C<nodemap> will apply C<&block> to each element and return a new
L<List|/type/List> with the return values of C<&block>. In contrast to
L<deepmap|/routine/deepmap> it will B<not> descend recursively into sublists if
it finds elements which L<does|/routine/does> the L<Iterable|/type/Iterable>
it finds elements which L<do|/routine/does> the L<Iterable|/type/Iterable>
role.
say [[1,2,3], [[4,5],6,7], 7].nodemap(*+1);
Expand All @@ -260,8 +260,9 @@ role.
# OUTPUT: «((3 4) (5 3))␤»
The examples above would have produced the exact same results if we had used
L<map|/routine/map> instead of C<nodemap>. The difference between the two lies in the
fact that L<map|/routine/map> flattens out L<slips|/type/Slip> while C<nodemap> doesn't.
L<map|/routine/map> instead of C<nodemap>. The difference between the two lies
in the fact that L<map|/routine/map> flattens out L<slips|/type/Slip> while
C<nodemap> doesn't.
say [[2,3], [[4,5],6,7], 7].nodemap({.elems == 1 ?? $_ !! slip});
# OUTPUT: «(() () 7)␤»
Expand Down

0 comments on commit 8e68d75

Please sign in to comment.