|
|
|
|
|
by kqr
2095 days ago
|
|
Lenses (or, rather, optics) are still far more powerful than plain record field getters. Optics allow - Mutation of nested records, - Iteration of collections, - Folding of collections, - Viewing discriminated cases that may or may not exist, - Building a structure around a value, and so on and so forth. |
|
[1] https://github.com/ghc-proposals/ghc-proposals/pull/282#issu...