Sort the letters of string in alphabetical order: Difference between revisions
Sort the letters of string in alphabetical order (view source)
Revision as of 16:42, 27 July 2021
, 2 years ago→{{header|Haskell}}
m (→{{header|Haskell}}: Added a variant which constructs a sorted string from a map of character counts) |
|||
Line 192:
--------------------------- TEST -------------------------
main :: IO ()
main = do
print $
M.toList
(
▲ "Was the misspelling of alphabetical as alphabitical a joke ?"
>>= uncurry (flip replicate)</lang>
{{Out}}
|