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