We're a place where coders share, stay up-to-date and grow their careers.
Haskell again
import Data.Char (toLower) compare_xos :: String -> Bool compare_xos = same . foldl kevin (0, 0) where kevin (x, o) c | toLower c == 'x' = (x + 1, o) | toLower c == 'o' = (x, o + 1) | otherwise = (x, o) same (x, o) = x == o
dammit kevin
Just being able to use Haskell impresses me lol
I can't do anything useful with it yet, but it's fun to solve coding katas :D.
Haskell again
dammit kevin
Just being able to use Haskell impresses me lol
I can't do anything useful with it yet, but it's fun to solve coding katas :D.