The power set function for lists should use () as the empty set. If you use nil, then it seems that you would have
(powerset nil) => (nil) but this is wrong, since the only subset of an empty set is the empty set. You could try to fix this by making (powerset nil) => nil but then your function would return a list for all cases except when presented with the empty set, which doesn't seem right. For sequences in general, Rich has said there is no such thing as an empty seq: http://groups.google.com/group/clojure/browse_thread/thread/966bd0d4bb18a4a2/b56470cbc8b4123e?lnk=raot&fwc=1 so I think you couldn't use seqs to represent sets (unless there is a notion of sets where there is no empty set). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---