@@ -186,23 +186,28 @@ say gather for 1 {
186186In this case, C<gather> sinks the C<for> statement, and the result of sinking
187187the L<C<Seq>|/type/Seq> will be iterating over its elements, calling C<.take> on them.
188188
189-
190- =head2 method deepmap
189+ =head2 routine deepmap
191190
192191 method deepmap(&block --> List) is nodal
192+ multi deepmap(&op, \obj)
193193
194- C<deepmap> will apply C<&block> to each element and return a new
195- L<C<List>|/type/List> with the return values of C<&block>, unless the element does
196- the L<C<Iterable>|/type/Iterable> role. For those elements
194+ C<deepmap> will apply its argument (or first argument for the sub form) to
195+ each element and return a new L<C<Iterable>|/type/Iterable> with the return
196+ values of the argument, unless the element does the
197+ L<C<Iterable>|/type/Iterable> role. For those elements
197198L<deepmap|/routine/deepmap> will descend recursively into the sublist.
198199
199200 say [[1,2,3],[[4,5],6,7]].deepmap(* + 1);
200201 # OUTPUT: «[[2 3 4] [[5 6] 7 8]]»
202+ say deepmap * + 1, [[1,2,3],[[4,5],6,7]];
203+ # OUTPUT: «[[2 3 4] [[5 6] 7 8]]»
201204
202205In the case of L<C<Associative>|/type/Associative>s, it will be applied to its values:
203206
204207=for code
205- { what => "is", this => "thing", a => <real list> }.deepmap( *.flip ).say
208+ { what => "is", this => "thing", a => <real list> }.deepmap( *.flip ).say;
209+ # OUTPUT: «{a => (laer tsil), this => gniht, what => si}»
210+ say deepmap *.flip, {what=>'is', this=>'thing', a=><real list>};
206211# OUTPUT: «{a => (laer tsil), this => gniht, what => si}»
207212
208213=head2 method duckmap
0 commit comments