Program a function powerset, which as input takes a set S (represented as a list). The function must return all possible subsets of S.

Hint: What is (powerset '())? It should, of course, be a set of sets. Each set is a represented as a list.

Solution