Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Eily's scratchpad

by Eily (Monsignor)
on Jun 17, 2013 at 17:59 UTC ( [id://1039429]=scratchpad: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use v5.14;
    
    #my $fact = sub { (sub { goto &{$_[0]} })->(sub { $_[1] ? $_[1] * $_[0
    +]($_[0], $_[1]-1) : 1 }, $_[0]) };
    ...
    
    *fact = (sub { my ($auto_fun,) = @_; sub { $auto_fun->($auto_fun, @_) 
    +} })->( sub { my ($self, $value) = @_; $value ? $value * $self->($sel
    +f, $value - 1) : 1 } );
    say "Test fact: $_!=", fact($_) for 3, 4, 5;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-03-19 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found