Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Consider making Delta[F[A]] ~= F[B] #11

Open
stacycurl opened this issue Apr 15, 2015 · 0 comments
Open

Consider making Delta[F[A]] ~= F[B] #11

stacycurl opened this issue Apr 15, 2015 · 0 comments

Comments

@stacycurl
Copy link
Owner

I'm planning on making Delta[scala.xml.Node] == scala.xml.Node & Delta[Json] == Json, so this could be applied more generally.

Example Set(1, 2).delta(Set(2, 3)) currently is SetPatch(added = Set(3), removed = Set(1)), it could be Set((Added, 3), (Removed, 1)) (SetPatch could extend Set to provide both).

Similarly Map(1 -> 1, 2 -> 2).delta(Map(2 -> 22, 3 -> 3)) == MapPatch(removed = Map(1 -> 1), added = Map(3 -> 3), changed = Map(2 -> 2.delta(22))), it could (almost) be Map(Removed -> Map(1 -> 2), Added -> Map(3 -> 3), Changed -> Map(2 -> 2.delta(22))).

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

No branches or pull requests

1 participant