I have a Set of items of some type and want to generate its power set.
I searched the web and couldn\'t find any Scala code that adresses this specific task.
Looks like no-one knew about it back in July, but there's a built-in method: subsets.
subsets
scala> Set(1,2,3).subsets foreach println Set() Set(1) Set(2) Set(3) Set(1, 2) Set(1, 3) Set(2, 3) Set(1, 2, 3)