Skip to content

Commit

Permalink
Point out difference between finite and infinite Range subscripts
Browse files Browse the repository at this point in the history
  • Loading branch information
taboege committed May 17, 2019
1 parent d51503b commit 68fbdb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/Language/list.pod6
Expand Up @@ -504,7 +504,9 @@ list's C<.elems> as an argument and uses the resulting range to slice:
say @a[0..^*/2]; # OUTPUT: «(1 2 3)␤»
Notice that C<0..^*> and C<0..^*+0> behave consistently in subscripts despite
one being an infinite range and the other a WhateverCode producing ranges.
one being an infinite range and the other a WhateverCode producing ranges,
but C<0..*+0> will give you an additional trailing C<Nil> because, unlike the
infinite range C<0..*>, it does not truncate.
=head2 Array constructor context
Expand Down

0 comments on commit 68fbdb7

Please sign in to comment.