Unique characters: Difference between revisions
→{{header|Haskell}}
Line 582:
Or folding the strings down to a hash of character frequencies:
<lang haskell>import qualified Data.Map.Strict as M
--------- UNIQUE CHARACTERS FROM A LIST OF STRINGS -------
uniqueChars :: [String] -> String
uniqueChars
[ k
| (k, v) <-
Line 594 ⟶ 593:
(flip (foldr (flip (M.insertWith (+)) 1)))
M.empty
1 == v
]
|