Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CollectionDifference API implementation #122

Open
2 tasks done
maximkrouk opened this issue Feb 21, 2021 · 1 comment
Open
2 tasks done

CollectionDifference API implementation #122

maximkrouk opened this issue Feb 21, 2021 · 1 comment

Comments

@maximkrouk
Copy link

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
Copy link
Author

maximkrouk commented Feb 21, 2021

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant