DifferenceKit icon indicating copy to clipboard operation
DifferenceKit copied to clipboard

CollectionDifference API implementation

Open maximkrouk opened this issue 4 years ago • 1 comments
trafficstars

Checklist

Question

I want to mimic the behavior of CollectionDifference, so I started with

extension Array where Element: Differentiable {
    public func diff(from other: Array) -> StagedChangeset<Array> {
        StagedChangeset(source: self, target: other)
    }
}

And I'd like to implement Array.apply method, but I'm not sure what is the right way to apply StagedChangeset to an existing collection...

maximkrouk avatar Feb 21 '21 16:02 maximkrouk

Also I'm looking for how to implement Array.diff(from:by:) method

maximkrouk avatar Feb 21 '21 17:02 maximkrouk