(subsets #{1, 2, 3})
(subsets ["apple", "orange", "banana"])
(defn subsets "All the subsets of items" [items] (mapcat (fn [n] (combinations items n)) (range (inc (count items)))))
Comments top
No comments for subsets. Log in to add a comment.