4 ms·
Most well-written libraries do not depend on the specific type of indexing in an array. There's a strong convention for writing index-agnostic code, with eachin
by DNF2 6y ago
Most well-written libraries do not depend on the specific type of indexing in an array. There's a strong convention for writing index-agnostic code, with eachindex(), enumerate(), firstindex(), lastindex(), begin, end, etc.
I try to write code to accept 0-, 1-, 2-, and StarWars-based indexing.