let factorial = fn x = if x == 1 then x else x * factorial(x - 1);