grade down

From The K Language Wiki
Revision as of 14:45, 9 July 2021 by Razetime (talk | contribs) (grade down)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Grade down
>x

The grade down primitive is used to get the indices of an array that would sort it in descending order.

Since grading is not the same as sorting, a general idiom used to sort arrays is {x(>x)} or other equivalent.

For numeric arrays:

 >34 -1 0 67 32767
4 3 0 2 1

Grading of string arrays largely depends upon the implementation, as shown in grade up.