CollectionDifference API implementation
maximkrouk opened this issue · comments
Maxim Krouk commented
Checklist
- Reviewed the README and documents.
- Searched existing issues for ensure not duplicated.
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...
Maxim Krouk commented
Also I'm looking for how to implement Array.diff(from:by:)
method