ok, I see what's what now after I look inside , its much like choroba wrote , %seen
sub next_multiset {
my $self = shift;
if ( ! $self->{frequency} ) {
print STDERR "must use next_combination() if 'frequency' argument
+not passed to constructor\n";
return ();
}
my $data = $self->data();
my $compare = $self->compare();
while ( my @combo = $self->_next_combination ) {
my $x = join '', map {scalar($$_)} sort @$data;
my $y = join '', map {scalar($_) } sort @combo;
next if $self->{'cache_multiset'}{$y}++;
return @combo;
}
$self->{'cache_multiset'} = undef;
return ();
}
so Algorithm::Combinatorics doesn't appear to support that(%seen) out of the box (I see no cache, no hv)