Sha256: 70583176feeee4708a8eab635715c38083422979054e5cb19a5b080088af19d1
Contents?: true
Size: 360 Bytes
Versions: 5
Compression:
Stored size: 360 Bytes
Contents
module WordCount (wordCount) where import Control.Arrow ((&&&)) import Data.Char (toLower, isAlphaNum) import Data.List (group, sort) import Data.List.Split (wordsBy) wordCount :: String -> [(String, Int)] wordCount = map (head &&& length) . group . sort . map (map toLower) . wordsBy (not . isAlphaNum)
Version data entries
5 entries across 5 versions & 1 rubygems