Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: recursive anonymous subroutines

by stvn (Monsignor)
on Apr 06, 2006 at 21:04 UTC ( #541736=note: print w/replies, xml ) Need Help??


in reply to recursive anonymous subroutines

In Perl 6 you will be able to do this:

sub ($x) { return unless $x > 0; $x.say; &SUB.($x - 1); }

-stvn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://541736]
help
Chatterbox?
[Eily]: I've posted my fourth root node on perlmonks and I haven't even been a monk for four years yet. I'm on fire \o/
[ambrus]: Eily: hmm... do you count your user and your scratchpad as root nodes you posted?
[Eily]: I would have if it had been convenient :P
[hippo]: Those are auto-posted. We just update them.
[LanX]: "you haven't been a monk" ???
[LanX]: oh "yet" .. got it

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2017-03-24 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (304 votes). Check out past polls.