in reply to Re: Re: Double your return!!!!
in thread Double your return!!!!

I wasn't seriously suggesting this as useful code.

I intended the question more as a perl puzzle that I couldn't solve. The code was only to illustrate the question and the critical text was is it possible?

Reading the responses and re-reading my initial post I obviously didn't make my intention clear enough.

Sometimes though, a joke or japh ends up being useful.

I don't think Quantum::Superpositions was intended seriously yet junctions (or whatever the name is now) is going to be in perl6.

Replies are listed 'Best First'.
Re^4: Double your return!!!!
by adrianh (Chancellor) on Feb 20, 2003 at 12:13 UTC

    Not possible in perl5 AFAIK.

    Since parrot is supposed to support continuations something like this might be possible in perl6 I guess.

    I know of one language that supports the idiom. Pop-11 has chainfrom, chainto, exitto and exitfrom which cover the full gamut of exit variations. However, apart from using chainto to optimise tail recursion I've never used them in "real" code :-)