keynote-compojure-api/example.hs
Yann Esposito (Yogsototh) 457edc3d94 initial commit
2014-11-18 22:35:07 +01:00

5 lines
140 B
Haskell

sort :: (Ord a) => [a] -> [a]
sort [] = []
sort (x:xs) = sort (filter (<x) xs) ++
[x] ++
sort (filter (>=x) xs)