countSerial :: Char -> String -> Int countSerial _ [] = 0 countSerial c str = max(length m)(countSerial c t) where (m,t) = span(==c)$dropWhile(/=c)str main::IO() main = interact $ show.countSerial '…'