I need to write a function that will produce all the possible subsets of a given list. I believe I should be using map, but I'm struggling to come up with the correct syntax for iterating through. Do I have to insert a lambda statement anywhere?
All possible subsets of the (list 1 2 3)
should be:
(list (list)
(list 1) (list 2) (list 3)
(list 1 2) (list 2 3) (list 1 3)
(list 1 2 3)))