Closed Scriptor closed 12 years ago
The following function should result in a PHP function that will exit in the first iteration of the loop generated by tail-recursion optimization.
(fn work () (let [foo "foo"] (if (== foo "foo") (foo) (work)
However, the actual generated code is:
function work(){ while(1){ $foo = "foo"; if(($foo == "foo")){ foo(); } } }
Where it calls foo() it should be return foo().
foo()
return foo()
The following function should result in a PHP function that will exit in the first iteration of the loop generated by tail-recursion optimization.
However, the actual generated code is:
Where it calls
foo()
it should bereturn foo()
.