2007-10-13から1日間の記事一覧
tabStop = 8 main = getContents >>= putStr . expand expand :: String -> String expand cs = concatMap expandTab cs expandTab :: Char -> String expandTab '\t' = replicate tabStop ' ' expandTab c = [c]
tabStop = 8 main = getContents >>= putStr . expand expand :: String -> String expand cs = concatMap expandTab cs expandTab :: Char -> String expandTab '\t' = replicate tabStop ' ' expandTab c = [c]