Created
June 26, 2014 12:11
-
-
Save lnicola/a896281a7fcac1847570 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Control.Monad | |
| import Data.Char | |
| import Data.List | |
| import Data.Ord | |
| process = reverse . (sortBy $ comparing snd) . (map $ \x -> (head x, length x)) . group . sort . words . map toLower . filter (flip notElem "().,\"") | |
| main = getContents >>= print . process |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment