re: Daily Challenge #29 - Xs and Os VIEW POST

FULL DISCUSSION
 

Haskell:

import Data.Char (toLower)

xo :: String -> Bool
xo xs = let o's = count 'o' str
            x's = count 'x' str
            str = map toLower xs
            count c = foldl (\sum char -> if c == char then sum + 1 else sum) 0
        in o's == x's
code of conduct - report abuse