Updating nested records in Elm
Wouter In t Velt

Very nice write-up! And I like the pattern. I see the note at the end of the article on Evan’s Focus package. That package and the pattern you described are very similar to a pattern called “lenses”. This is neato and relatively simple package for using lenses in Elm: http://package.elm-lang.org/packages/arturopala/elm-monocle/latest

As you noted with Evan’s caveats, it’s possible that reaching for lenses might be an indicator that it’s actually time to refactor the model. However I’m not experienced enough to say unequivocally that they either should or should not be used.

They’re certainly a neat idea!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.