// scala> "abcd".toSet.subsets.toSeq val res1: Seq[Set[Char]] = List(Set(), Set(a), Set(b), Set(c), Set(d), Set(a, b), Set(a, c), Set(a, d), Set(b, c), Set(b, d), Set(c, d), Set(a, b, c), Set(a, b, d), Set(a, c, d), Set(b, c, d), Set(a, b, c, d))