--@recursive

local function factorial(n : number) : number
	if n == 0 then return 1 end
	return n * factorial(n - 1)
end

local function binomial(n : number, i : number) : number
	local x : number = nil
	x = (factorial(n)) / 
		(factorial(n - i) * factorial(i))
	return x
end
