The Oz Compiler launch an exception "Missing Else Clause" when I try to compile this code, can anybody tell me why? Here is my code :
declare
fun {Numero x y}
local NumeroAux in
fun {NumeroAux x y Acc}
if {And (x == 0) (y == 0)} then Acc
else
if y == 0 then {NumeroAux 0 x-1 Acc+1}
else
{NumeroAux x+1 y-1 Acc+1}
end
end
end
{NumeroAux x y 0}
end
end
{Browse {Numero 0 0}}
In my opinion, there isn't a missing else clause in this code! My function will always return something.