5 lines
166 B
Haskell
5 lines
166 B
Haskell
|
import Data.List(group, sort)
|
||
|
import Data.Char(toLower)
|
||
|
|
||
|
duplicateCount :: String -> Int
|
||
|
duplicateCount = length . filter ((>1) . length) . group . sort . map toLower
|