language agnostic - What is the name for reverse lens? -
lens function perform immutable record modification: copies record modifying part of content. lenses library allows combine lenses attain more complicated modifications.
i'm searching correct term defines reverse abstraction. function compares 2 objects , return difference between them. such functions produce system. each modification represented simultaneously fine-grained description "field inside field b inside field c inside record" or coarse "field c inside record". can pattern match modification desired grade of accuracy.
i need write code comparing records , reacting modifications inside them. avoid reinventing wheel. tried google reverse lenses drowned in non-relevant output.
you can refer differential synchronisation algorithm this. algorithm based on diff , patch operations. diff part may useful you.
for further reference : https://neil.fraser.name/writing/sync/
Comments
Post a Comment