Re: Subscripting, semicolons, and adverbs

2021-12-11 Thread Ralph Mellor
TL;DR Raku does not treat a negative index as valid. To specify the index of the last element, write `*-1`. What you're seeing is Raku trying to inform you that you are using invalid indices. On Fri, Dec 10, 2021 at 9:49 PM Sean McAfee wrote: > > @array[-1]:exists is a syntax error, even though

Re: Subscripting, semicolons, and adverbs

2021-12-11 Thread Sean McAfee
On Sat, Dec 11, 2021 at 11:28 AM Ralph Mellor wrote: > On Fri, Dec 10, 2021 at 9:49 PM Sean McAfee wrote: > > > > @array[-1]:exists is a syntax error, even though it looks like > > it should just evaluate to True. > > In Raku `foo[-N]` is invalid. At compile-time if N is statically > known, othe