declare
fun {Factorial N}
local FactorialAux in
fun {FactorialAux N Product}
if N == 0 then Product
else {FactorialAux N-1 {fibo N}|Product}
end
end
{FactorialAux N nil}
end
end
fun {fibo N}
if N==1 then 1
else if N==2 then 1
else {fibo N-1}+{fibo N-2}
end
end
end
{Browse {Factorial 3}}
My code prints the list of fibonacci number.If N =4 then it prints first four fibonacci number list This is my code in which i am getting the error stated in the heading of question. Thanks for any help in advance
Variables must start with an uppercase letter in Oz. Procedure and function names are always variables, so they must also start with an uppercase letter.
Your function
fibo
should be calledFibo
. And of course, all calls tofibo
must be fixed, too.