Whenever I have a function to call at the end of another, I always call it on the same line as return, for example return foo(x).
Would assign the result of the variable botch any tail optimization opportunity? Like this,
function(...)
...
tmp = foo(x)
return tmp
end
source
share