                     return res + R(sgn(i)) * M(t)
                 }
             }
-            return F(map)
+            return F(inBasis: chns[i], outBasis: (i > 0) ? chns[i - 1] : [], mapping: map)
         }
         bmaps += [F.zero]
         

        return Array(queue)
    }
    
    public var hashValue: Int {
        return description.hashValue
    }

}

public struct SimplicialComplex {
    public let simplices: Set<Simplex>
    
    public init<S: Sequence>(_ simplices: S, generate: Bool = false) where S.Iterator.Element == Simplex {
        self.simplices = generate ?
            simplices.reduce(Set()) { $0.union($1.allSubsimplices()) }
            : Set(simplices)
    }
    
    public func chainComplex<R: Ring>() -> ChainComplex<Simplex, R> {
