princepawn has asked for the wisdom of the Perl Monks concerning the following question:

I just saw Damian Convway in person last night and was floored by what he was able to do with his definitional/intensional programming module Quantum::Superpositions

However, once back at my computer, some of the examples in the documentation did not work as advertised. It states that for the following operations:

if (all(1,2,3)*any(5,6) < 21) { print "no alcohol" } if (all(1,2,3)*any(5,6) < 18) { print "no entry" } if (any(1,2,3)*all(5,6) < 18) { print "under-age" }
That "no alcohol" and "under-age" are printed. But in fact, "no alcohol" and "no-entry" are printed

If you do some diagnostics and instrument the program:

$R1 = all(1,2,3)*any(5,6); $R2 = all(1,2,3)*any(5,6); $R3 = any(1,2,3)*all(5,6); print $R1; print "\n"; print $R2; print "\n"; print $R3; print "\n";

You get the following output:

all(any(5,6),any(10,12),any(15,18)) all(any(5,6),any(10,12),any(15,18)) any()

Replies are listed 'Best First'.
Re: Quantum::Superpositions does not work as advertised
by merlyn (Sage) on Oct 19, 2000 at 14:50 UTC
      This is all fine and dandy but I think the question on most camels minds is

      any('perl4','perl5','perl6') % all('Larry', 'Damian','Randall', 'Tom', any('perl6RFCAuthor) ) = ???

      Note: Any resemblance of the above code segment to any other segment living or dead, is the product of an evil mind.

      Mitd -- Made in the Dark 'grey appears to be my favourite colour'