-- Inspired by SICP fac1 1 = 1fac1 n = n * fac1 (n - 1) fac2 n = fac_iter 1 1 where fac_iter pro cnt | cnt > n = pro | otherwise = fac_iter (cnt * pro) (cnt + 1)