in reply to any-all
(silly) example:And using Damian Conway's new Quantum::Superpositions module, you can write these as:will return 1 if any two matching elements of the array satisfy the condition in the block.$res1=any { $a<$b } \@vec1, \@vec2;will return 1 if all pairs satisfy the condition.$res2=all { $a<$b } \@vec1, \@vec2;
All praise "The Damian".use Quantum::Superpositions; $res1 = any(@vec1) < any(@vec2); $res2 = all(@vec1) < all(@vec2);
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Quantum::Superpositions (was RE: any-all)
by davorg (Chancellor) on Sep 02, 2000 at 20:38 UTC | |
by merlyn (Sage) on Sep 02, 2000 at 20:59 UTC |