Created
November 12, 2020 02:04
-
-
Save rxw1/6c1ccb788331c8ca6ba7a92338afd692 to your computer and use it in GitHub Desktop.
Revisions
-
rwilhelm created this gist
Nov 12, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ import Data.List import Data.Ord main = interact $ (=<<) (\x -> show (length x) ++ " " ++ head x ++ "\n") . sortBy (flip $ comparing length) . group . sort . words