def factorial n n * factorial(n - 1) unless n == 1; end