Example 3 2021-08-03 factorial n = go n 1 where go n res | n > 1 = go (n - 1) (res * n) | otherwise = res