Usage
sort! l
sort!(l, f)
Signature
sort!: (%,(T,T) Boolean) %
Parameter | Type | Description |
---|---|---|
l | % | a list |
f | (T, T) Boolean | a comparison function |
Description
Sorts the list using the ordering . The comparison function is optional if has TotallyOrderedType, in which case the order function of is taken.
Remarks
sort! does not make a copy of , which is therefore modified after the call. It is unsafe to use the variable after the call, unless it has been assigned to the result of the call, as in l := sort! l.
See Also
merge!