税込み価格への修正
http://ja.doukaku.org/6/lang/haskell/より。Parsec使ってみました。Persec使った方が拡張性がいい。と思いたいです。
module Main (main) where import Text.ParserCombinators.Parsec text :: Parser [String] text = many $ price <|> other price :: Parser String price = return . tax =<< many1 digit where tax :: String -> String tax = show . floor . (1.05 *) . read other :: Parser String other = many1 $ noneOf ['0' .. '9'] main :: IO () main = interact $ either show concat . parse text ""