Iterator to produce inductively all subsets of 0,...,n starting with L={}.
i1 : L={}
o1 = {}
o1 : List
|
i2 : while class(L)=!=Boolean do (L=nextSubset(L,3);print L)
{0}
{1}
{2}
{3}
{0, 1}
{0, 2}
{0, 3}
{1, 2}
{1, 3}
{2, 3}
{0, 1, 2}
{0, 1, 3}
{0, 2, 3}
{1, 2, 3}
{0, 1, 2, 3}
true
|