> countCS :: [Char] -> [(Char, Int)] I use this count :: (Ord a, Num b) => [a] -> (a -> b,[(a,b)]) count xs = ( flip (Map.findWithDefault 0) m , Map.assocs m ) where m = Map.fromListWith (+) $ zip xs $ repeat 1 which returns the frequencies list as well as a query function that I found myself quite often useful. /BR