Skip to content

Commit 69b6eb5

Browse files
committed
More answer to Mouq's example.
1 parent 43f7fde commit 69b6eb5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

S07-glr-draft.pod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,17 @@ C<lcat>, or for a method form perhaps C<.ljoin>. Huffmanly speaking,
282282
I don't see a list concat operation as yet being common enough to
283283
warrant a very short operator.
284284

285+
To answer the examples above, the short answer is that the result of
286+
a list join is simply a list containing the elements of the lhs followed
287+
by the elements of the rhs. No flattening involved -- if you want
288+
flattening, you can do it manually. In the examples containing
289+
arrays as arguments, the resulting list would end up with the array's
290+
scalar container elements, not just the values.
291+
292+
my @a = 4, 5, 6;
293+
(1..3) ⟛ @a # (1..3, @a[0], @a[1], @a[2])
294+
(1, 2, 3) ⟛ @a # (1, 2, 3, @a[0], @a[1], @a[2])
295+
285296
=back
286297

287298
=head1 AUTHORS

0 commit comments

Comments
 (0)