module Vowels (countVowels) where
import Data.Char (toUpper)
isVowel :: Char -> Bool
isVowel = flip elem "AEIOU"
countChar :: Char -> Integer
countChar letter = if isVowel letter 1 else 0
countVowels :: String -> Integer
countVowels = sum . map (countChar . toUpper)
Will have to double check the syntax (on Mobile) but I think this will work
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.