April 16, 2020
A quick over view of lens
You’ve completed the Data61 FP Course. You’ve gone on and finished every single exercise in the QFPL Applied FP Course. You know what you’re doing, so you join a Haskell project, and are presented with:
update things thing = let thatThing = Map.lookup (thing ^. properties . identifier) things thingName = thatThing <&> view (metadata . name) thingResponsibilities = thatThing <&> view responsibilities in thing & name .~ thingName & responsibilities <>~ thingResponsibilities & age %~ (* 2) This looks nothing like the language you’ve been using!
Read more