Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Currying--useful examples?

by Errto (Vicar)
on Jan 11, 2007 at 00:56 UTC ( [id://594040]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # contrived
    my $incAll = map { $_++ };
    ...
    my @data2 = return_some_other_numbers();
    $incAll->(@data);
    $incAll->(@data2);
    
  2. or download this
    sub makeIncr {
      my $incr = $_[0];
      return map { $_ += $incr };
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://594040]
help
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-04-26 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found