sort¶
Sorts data in a map< K, V >, list< T >, or set< T >.
Parameters:
No. | Type | Comments |
---|---|---|
1 | map< K, V >, list< T > or set< T > | The object to be sorted |
2 | A lambda that accepts 2 parameters and returns an int |
Expects -1, 0 or 1, similar to output of compare |
Returns:
A map< K, V >, list< T > or set< T > that has been sorted.
Usages:
sort( v:list<T>, e => int-expression ) : list<T>
sort( v:set<T>, e => int-expression ) : set<T>
sort( v:map<K, V>, (k, v) => int-expression ) : map<K, V>