Are there standard sorting functions in SML? The documentation on the Internet is so scarce I couldn\'t find any.
How about this for sorting a list? You could always use reverse to get the reverse.
- fun sort(L) = if L=[] then [] else if tl(L)=[] then L else merge(sort(take(L)), sort(skip(L))); val sort = fn : int list -> int list
See here.