Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: The Future of Perl 5

by ajs (Novice)
on Aug 19, 2018 at 14:46 UTC ( [id://1220636]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub fibonacci (PositiveInt $n) {
        return 1 if $n <= 1;
        return fibonacci($n-1) + fibonacci($n-2);
    }
    
  2. or download this
    sub fibonacci ($n ...
    # Wait, wait... hold on a second! What is this $n thing you claim
    ...
        return 1 if $n <= 1;
        return fibonacci($n-1) + fibonacci($n-2);
    }
    
  3. or download this
    sub fibonacci($n {$n >= 0 && int($n) == $n}) {
        return 1 if $n <= 1;
        return fibonacci($n-1) + fibonacci($n-2);
    }
    
  4. or download this
    sub fibonacci($n) {
        die '$n failed check "$n >= 0 && int($n) == $n"' unless $n >= 0 &&
    + int($n) == $n;
        ...
    }
    
  5. or download this
    sub fibonacci(PostiveInt $n) {
    
  6. or download this
    sub fibonacci($n {$n = PostiveInt->new($n)}) {
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1220636]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found