Re:Again on 0-based vs. 1-based indexing
by codeflo on Wednesday January 20, 2021 @06:22AM
(#25845093)
I think the most mathematically natural way to interpret negative indices is to threat them as numbers modulo list length. Then 0 = length, and -1 = length - 1.
[ Parent
| on HN ]