http://www.perlmonks.org?node_id=305196


in reply to Nested Quantum::Superpositions

Without ever having used that module extensively, my thinking is that for your second example, you want this:
(all(1,4) == any(any(1,4), any(2), any(3))) and print "y2\n";
all(1,4) can not equal all(1,4) because that would mean 1 equals 4, which is obviously not true.

Update: After rereading your post, I'm thinking that the above is probably not what you want either. I don't think this is correct:

use Quantum::Superpositions; if ( any("tall", "rich", "handsome") eq all('tall', 'rich', 'handsome' +) ) { print "match1\n"; } if ( all("tall", "rich", "handsome") eq any('tall', 'rich', 'handsome' +) ) { print "match2\n"; } #prints: match2
Update: I think I understand the example in the docs now(posted by welchav above), and the reason it doesn't seem to work is that you can't use any simple Q::S object to equal any of those feature sets. No one simple thing can equal 'all' of "tall", "rich", and "handsome". You need some special object which can equal all of those things at once. And so I'm not sure if the results above are correct, or a bug. I don't know if 'eq' in Q::S is supposed to be commutative.