mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-06 14:56:54 +02:00
Merge pull request #2033 from kirbyfan64/kirbyfan64-patch-1
Fix typo in Perl 6 example (closes #2025)
This commit is contained in:
@@ -373,7 +373,7 @@ say @array[^10]; # you can pass arrays as subscripts and it'll return
|
|||||||
say join(' ', @array[15..*]); #=> 15 16 17 18 19
|
say join(' ', @array[15..*]); #=> 15 16 17 18 19
|
||||||
# which is equivalent to:
|
# which is equivalent to:
|
||||||
say join(' ', @array[-> $n { 15..$n }]);
|
say join(' ', @array[-> $n { 15..$n }]);
|
||||||
# Note: if you try to do either of those with an infinite loop,
|
# Note: if you try to do either of those with an infinite array,
|
||||||
# you'll trigger an infinite loop (your program won't finish)
|
# you'll trigger an infinite loop (your program won't finish)
|
||||||
|
|
||||||
# You can use that in most places you'd expect, even assigning to an array
|
# You can use that in most places you'd expect, even assigning to an array
|
||||||
|
Reference in New Issue
Block a user