     throws where Value == [C.Element]
     {
         self.init()
-        while let value = try cursor.next() {
+        try cursor.forEach { value in
             try self[keyForValue(value), default: []].append(value)
         }
     }

    throws where C.Element == (Key, Value)
    {
        self.init()
        while let (key, value) = try keysAndValues.next() {
            if updateValue(value, forKey: key) != nil {
                fatalError("Duplicate values for key: '\(String(describing: key))'")
            }

    /// - parameter cursor: A cursor of values to gather into a set.
    public init<C: Cursor>(_ cursor: C) throws where C.Element == Element {
        self.init()
        try cursor.forEach { insert($0) }
    }
    
    /// Creates a set containing the elements of a cursor.
