Another EXAMPLE

def f(n)
if n>100 return n
return f(n+1)
end

p f(1)

An optimization (in the Ruby parser) would be to leave out all jump backs,
if returning (after return the method cant do anyrhing more, so we could
return from the inner "loop" directly to the first. (1 jump back, not n)
My question is if this optimization step is implemented already.

The other question is how params can be transferred, without allocating
extra memory (reusing the same var, because old one is not needed any more.
Berg
(supressed text/html)
Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>