2008-11-20 パターンマッチで階乗 Haskell main = print $ fact 3 fact :: Int -> Int fact 0 = 1 fact x = x * fact (x - 1)