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