![Scala Design Patterns.](https://wfqqreader-1252317822.image.myqcloud.com/cover/27/36700027/b_36700027.jpg)
上QQ阅读APP看书,第一时间看更新
The visitor design pattern
The visitor design pattern represents an operation to be performed on the elements of an object structure. It allows developers to define a new operation without changing the original classes. Scala can minimize the verbosity of this pattern compared to the pure object-oriented way of implementing it by passing functions to methods.