 			sets[a].parent = parent
 			return parent
 		}
+	}
+
+	public mutating func findAllInPlace() -> Set<Int> {
+		return Set(lazy(sets)
+			.map { $0.0 }
+			.map(findInPlace))
 	}
 
 

		}
	}

	public mutating func findInPlace(a: Int) -> Int {
		let n = sets[a]
		if n.parent == a {

	/// This is distinct from the number of partitions in the set.
	public var count: Int {
		return sets.count
	}


