Determine if a number is less than another
APL (Dyalog Unicode), 2 bytesSBCS



Anonymous tacit prefix function. Requires ⎕IO←0

⊃⍒


Try it online!

⍒ gives the "grade". The indices into the argument that would stably sort it in descending order


If the first element is less than the second, it gives [1,0]
If the the elements are equal, it gives [0,1]
If the second element is less than the second, it gives [0,1]


⊃ picks the first element of that


If the first element is less than the second, it gives 1
If the the elements are equal, it gives 0
If the second element is less than the second, it gives 0