パターンマッチで階乗

main = print $ fact 3

fact :: Int -> Int
fact 0 = 1
fact x = x * fact (x - 1)