- Companion
- class
Type members
Value members
Concrete methods
def apply[Container, A](getter: Container => A)(setter: (Container, A) => Container): Lens[Container, A]
This is the unit lens, with respect to the compose operation defined above. That is, len.compose(unit) == len == unit.compose(len)
This is the unit lens, with respect to the compose operation defined above. That is, len.compose(unit) == len == unit.compose(len)
More practically, you can view it as a len that mutates the entire object, instead of just a field of it: get() gives the original object, and set() returns the assigned value, no matter what the original value was.