Hello,
I am testing below code
fibonaci = fn
0 -> 0
1 -> 1
n -> fibonaci.(n-1) + fibonaic.(n-2)
end
IO.puts fibonaci.(10)
I am getting error as
elixir fibonaci.ex
warning: variable "fibonaci" does not exist and is being expanded to "fibonaci()", please use parentheses to remove the ambiguity or change the variable name
fibonaci.ex:4
** (CompileError) fibonaci.ex:4: undefined function fibonaci/0 (there is no such import)
Please help, Thank you.