3 ms·
Yes it could. But lenses offer much more than that. They are sometimes called "functional references", because a lens can be used for both reading and updating;
by grumpyprole 4y ago
Yes it could. But lenses offer much more than that. They are sometimes called "functional references", because a lens can be used for both reading and updating; and can be passed around. They can also be composed and combined in arbitrarily complex ways, e.g a lens into a map, option or a list.