Is there any function or library that efficiently partitions a set of n elements into non empty sets in Clojure?
For example, there are five ways the numbers {1,2,3} can be partitioned: {{1},{2},{3}}, {{1,2},{3}}, {{1,3},{2}}, {{1},{2,3}}, and {{1,2,3}}
Is there a library for doing so in Clojure or Java, or an efficient algorithm? Deriving the number of these combinations is called a Bell number, if it is of any help.