How to do a powerset in DrRacket?
What’s in a powerset? A set’s subsets! An empty set is any set’s subset, so powerset of empty set’s not empty. Its (only) element it is an empty set: (define (powerset aL) (cond [(empty? aL) (list empty)] [else As for non-empty sets, there is a choice, for each set’s element, whether to be or not … Read more