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

Re: Subroutine chaining idiom requested

by merlyn (Sage)
on May 24, 2001 at 09:23 UTC ( #82826=note: print w/ replies, xml ) Need Help??


in reply to Subroutine chaining idiom requested

use List::Util qw(reduce); # unnecessary in in Perl 6 {grin} my @result = reduce { [$b->{@$a}] } [], @$agenda;
Or, without that:
my @result; @result = $_->(@result) for @$agenda;

-- Randal L. Schwartz, Perl hacker


Comment on Re: Subroutine chaining idiom requested
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-09-15 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls