Scala Design Patterns.
上QQ阅读APP看书,第一时间看更新

The lens design pattern

The Scala programming language promotes immutability. Having objects immutable makes it harder to make mistakes. However, sometimes mutability is required and the lens design pattern helps us to achieve this nicely.