in reply to RFC: Acme::BottomsUp
Cute. Reminds me of Perl 6 Feed operators. From S06:
Leftward feeds are a convenient way of explicitly indicating the typical right-to-left flow of data through a chain of operations:Rightward feeds are a convenient way of reversing the normal data flow in a chain of operations, to make it read left-to-right:@oddsquares = map { $_**2 }, sort grep { $_ % 2 }, @nums; # more clearly written as... @oddsquares = map { $_**2 } <== sort <== grep { $_ % 2 } <== @nums +;Note that the parens are necessary there due to precedence.@oddsquares = (@nums ==> grep { $_ % 2 } ==> sort ==> map { $_**2 });
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC: Acme::BottomsUp
by SadPenguin (Novice) on Aug 17, 2006 at 02:45 UTC |