My basic idea is to map the array indices to bits in a binary number. If a bit is on, you take that element out of the source array.
This is precisely the same approach that I used in Data::PowerSet, for indeed, what the OP is looking for is the power set of the list.
• another intruder with the mooring in the heart of the Perl
In reply to Re^2: possible combinations in sequence
by grinder
in thread possible combinations in sequence
by ruzam
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |