What is the name for reverse lens?
Asked Answered
T

1

6

Lens is a function that perform immutable record modification: it copies the record modifying part of its content. Lenses is a library that allows you to combine lenses to attain more complicated modifications.

I'm searching for correct term that defines reverse abstraction. Some function that compares two objects and return difference between them. Such functions also produce a system. Each modification could be represented simultaneously with fine-grained description "field A inside field B inside field C inside the record" or with coarse "field C inside the record". So you can pattern match modification with desired grade of accuracy.

I need to write code for comparing records and reacting to modifications inside them. I would like to avoid reinventing the wheel. I tried to google reverse lenses but drowned in non-relevant output.

Threaten answered 16/1, 2016 at 1:2 Comment(0)
W
2

You can refer to Differential Synchronisation Algorithm for this. Its an algorithm based on DIFF and PATCH operations. The DIFF part may be useful for you.

For further reference : https://neil.fraser.name/writing/sync/

Wanids answered 25/1, 2016 at 8:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.