Tom Hall wrote:
> how can i sort first by l[0], then l[1]
l = [[2, "z"], [1, "z"], [1, "a"], [2, "a"]]
~cmp = {|a, b|
if(a[0] == b[0],{a[1] < b[1]},{a[0] < b[0]});
};
l.sort(~cmp);
I can't recall how to write (compare a b => [EQ | GT | LT]) but that'd
avoid some work above.
Regards,
Rohan