Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Thanks for the nice answer. One question though: why lensing does not create any issues for concurrency? (like if it is similar to mutables, it would make sense if it has the same problems with concurrency) Commented Feb 8, 2017 at 21:29
  • 2
    Lensing is still immutable, it just creates an API that resembles a deep mutation. When you do a "set" anyone else who has a reference to any part of the old structure will still have the old unmodified value. You have to assign the result to a new variable in a new scope. Commented Feb 8, 2017 at 22:41