4 ms·
>Obviously, there is here a language-level requirement in K that 0, "0" or "a" all denote an index zero, at least in the exemplified situation. no, 0 just sort
by Avshalom 10y ago
>Obviously, there is here a language-level requirement in K that 0, "0" or "a" all denote an index zero, at least in the exemplified situation.
no, 0 just sorts before 1, "0" before "1" and "a" before "b"
- kazinator 10y agoI see so something like "abac" is basically mapped to 0 1 0 2 by mapping the lowest-order element in that sequence to 0, and the others following suit. In which case, it would be expected that, say, "xyxz" could be used in place of "abac". "Auto-indexifying" a sequence in this way does seem like a useful little operation to have.
- Avshalom 10y agoGrade up (or grade down) returns the index of an array in sorted order. So >"weasels" would return: 0 3 6 5 1 4 2.