(* P1comb = f[P1]; *) P1comb = f[P1] - Count[{ }, P1]; P2comb = f[P2] - Count[{P1}, P2]; B1comb = f[B1] - Count[{P1, P2}, B1]; B2comb = f[B2] - Count[{P1, P2, B1}, B2]; P3comb = f[P3] - Count[{P1, P2, B1, B2}, P3]; B3comb = f[B3] - Count[{P1, P2, B1, B2, P3}, B3]; I am writing the above code, which works perfectly fine. Then I noticed a pattern, so I am just wondering if I might be able to write it better (more compactly) and more efficient using something like FoldList or NestList combined with a pure function, like
FoldList/NestList [] & {P1,P2,B1,B2,P3,B3} Thanks.

