Looks to me like with a few appropriate methods, you have left-to-right
ordering for free.

(@foo, @bar) := @a 
    . grep { $_ > 0} 
    . sort { $^b <=> $^b } 
    . part [/foo/, /bar/];

Of course, that means that grep and sort and part are all methods of the Array
class, so the standard way to write them would be 

grep @a: {$_ > 0};

instead of 

grep {$_ > 0} @a;

Hmmmm.  Odd.  I'm guessing it wouldn't be possible to extend the indirect
object syntax to allow 

grep {$_ > 0} @a:;

(object can go anywhere in argument list, so long as it's marked with a :.  But
now I'm trying to speculate about Larry's colon, something best left to
others).

But somehow it seems like an increase in readability, especially if things were
renamed.  Imagine renaming "grep" to "where" or "suchthat".  And then the
antigrep can be "except".  
-- 
Adam Lopresto ([EMAIL PROTECTED])
http://cec.wustl.edu/~adam/

If God didn't want us to eat animals, he wouldn't have made them out of
meat!

Reply via email to