I'm using the beginning language with list abbreviations for DrRacket and want to make a powerset recursively but cannot figure out how to do it. I currently have this much
(define
(powerset aL)
(cond
[(empty? aL) (list)]
any help would be good.
Here's my implementation of power set (though I only tested it using standard Racket language, not Beginning Student):
(Thanks to samth for reminding me that flatmap is called
append-mapin Racket!)