Are there standard sorting functions in SML? The documentation on the Internet is so scarce I couldn't find any.
There is no sorting functionality defined in the SML Basis Library, but most implementations extend the basis library and add extra functionality.
As such MosML has both an ArraySort and a Listsort module, and SML/NJ has a LIST_SORT signature with a ListMergeSort implementation. It also features some other sorting features on arrays as MosML. See the toc of the SML/NJ Library Manual, for a full list.