RosettaCodeData/Task/Sort-numbers-lexicographically/Haskell/sort-numbers-lexicographically-2.hs
2023-07-01 13:44:08 -04:00

8 lines
141 B
Haskell

import Data.List (sort)
task
:: (Ord b, Show b)
=> [b] -> [b]
task = map snd . sort . map (show >>= (,))
main = print $ task [1 .. 13]