Nice!
I also wonder how this would be done in Haskell. I'm in process of reading the book on optics, didn't see something similar there yet.
My hunch is that this looks like "sequencing in context" and this speaks "Monad", but lenses are not monads, so this hunch must be wrong 🙂
Still
copy
in this PR looks like haskell's
do
🙂
s
simon.vergauwen
08/01/2022, 9:09 PM
This uses a mutable
var
in the underlying impl and applies the transformations in sequence