so basically,
native list.Sort(cmp, asc)
we get to input the comparator, it gets called with (A, B) with the usual conventions on other languages
asc determines if the result is reversed (useful for native when not specifying a proc)
if not specified, it sorts numbers, text, and datums ascending with a new datum-level sort() proc
i'm not sure how this would potentially handle mismatching types (given usually in space station we just assume people won't do something insane like trying to pass our sort functions heterogenous lists) though.
ID:2844644
Dec 29 2022, 12:19 pm
|
|||||||
| |||||||