content: -- Kata: https://www.codewars.com/kata/54bf1c2cd5b56cc47f0007a1/train/haskell
  
  import Data.Char
  import Data.List
  
  matchCaseInsensitive :: Char -> Char -> Bool
  matchCaseInsensitive a b
    | a == b = True
    | toLower a == b = True
    | toUpper a == b = True
    | otherwise = False
  
  countChar s c = length (filter (`matchCaseInsensitive` c) s)
  
  duplicateChars "" = []
  duplicateChars s
    | length s == 1 = []
    | otherwise = nub [toLower x | x <- s, countChar s x >= 2]
  
  duplicateCount :: String -> Int
  duplicateCount s = length (duplicateChars (duplicateChars s))
  