         return working.isEmpty
     }
     
-    var resultData: [MatrixCoord : R] {
+    var resultData: MatrixData<R> {
         return Dictionary(pairs: (result + working).flatMap{ (i, list) -> [(MatrixCoord, R)] in
-            list.values.map{ (j, a) in (MatrixCoord(i, j), a) }
+            list.map{ c in
+                let (j, a) = c.value
+                return (MatrixCoord(i, j), a)
+            }
         })
     }
     

            }
        }
        
        working[i2] = toHead.drop{ c in c.value == .zero } // possibly nil
    }
    
    func finished(row i: Int) {

        working = result
        result = [:]
        result.reserveCapacity(working.count)
    }
    
    static func identity(size n: Int) -> RowEliminationWorker<R> {
        let comps = (0 ..< n).map { i in (i, i, R.identity) }
        return RowEliminationWorker(size: (n, n), components: comps)
    }

    // for test
