[READ-ONLY] Mirror of https://github.com/shuuji3/normal-haskell-programming-book. Codes for『ふつうのHaskellプログラミング』http://www.loveruby.net/ja/stdhaskell/
0

Configure Feed

Select the types of activity you want to include in your feed.

expand version 1

+3 -4
+3 -4
expand.hs
··· 3 3 putStr $ expand cs 4 4 5 5 expand :: String -> String 6 - expand cs = map translate cs 6 + expand cs = concat $ map expandTab cs 7 7 8 - translate :: Char -> Char 9 - translate c = if c == '\t' then '@' 10 - else c 8 + expandTab :: Char -> String 9 + expandTab c = if c == '\t' then " " else [c]