Help for this page

Select Code to Download


  1. or download this
    my @a = ( 1, 2, 3, 4, 5, 6 );
    my @b = ( 3, 4, 5, 6, 7, 8 );
    ...
    @a_lookup{@a} = ();
    my @b_only = grep { not exists $a_lookup{$_} } @b;
    print "@b_only\n";
    
  2. or download this
    use Quantum::Superpositions;
    
    my @a = ( 1 .. 6 );
    my @b = ( 3 .. 8 );
    print "$_\n" foreach eigenstates( any( @b ) != all( @a ) );