feat(haskell): add counting duplicates
This commit is contained in:
parent
2e43ff0c6b
commit
069972f5d5
|
@ -0,0 +1,5 @@
|
|||
import Data.List(group, sort)
|
||||
import Data.Char(toLower)
|
||||
|
||||
duplicateCount :: String -> Int
|
||||
duplicateCount = length . filter ((>1) . length) . group . sort . map toLower
|
Loading…
Reference in New Issue