How would I order a list so that the list of elements appears in ascending order. I remember it was a simple haskell prelude function but now I forget (:s):
> [1,4,5,7,9,3,1,3,5,1]
[1,1,1,3,3,4,5,5,7,9]
Preferably without having to import modules:
Thanks for reminding me 🙂
Use
sortfromData.Listto sort your list and thenshowit. So in a ghci session: