in reply to any-all

Thus spoke fundflow:
(silly) example:
$res1=any { $a<$b } \@vec1, \@vec2;
will return 1 if any two matching elements of the array satisfy the condition in the block.
$res2=all { $a<$b } \@vec1, \@vec2;
will return 1 if all pairs satisfy the condition.
And using Damian Conway's new Quantum::Superpositions module, you can write these as:
use Quantum::Superpositions; $res1 = any(@vec1) < any(@vec2); $res2 = all(@vec1) < all(@vec2);
All praise "The Damian".

-- 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