Sort the letters of string in alphabetical order: Difference between revisions

Content deleted Content added
Petelomax (talk | contribs)
m →‎case insensitive: use internal sort
Hout (talk | contribs)
Line 131:
qSort :: (Ord a) => [a] -> [a]
qSort [] = []
qSort (x : xs) = before <> [(x] <> :after)
where
before = qSort [c | c <- xs, c <= x]
after = qSort [c | c <- xs, c > x]</lang>
</lang>
{{Out}}
<pre>" ?Iaaaaaaaabbcceeefghhhiiiiiijkllllllmnoopppsssssttt"</pre>