factorial = function(n) result = 1 for i in range(2,n) result = result * i end for return result end function print factorial(10)