Let's Lens - Part 4 of 5
summary
Exercises build concrete lenses in Haskell (requires GHC 7.8+) and walk from simple get/set to modern constructions, using the Lets.GetSetLens and Lets.Lens` modules and the real lens package. Code shows an alongside pattern, implementing a Map lens that does lookup then insert or delete, uses modify vs set, composes optics, and checks the lens laws. The repository examples compile against the course code and demonstrate the actual implementations and small runnable proofs rather than abstract promises.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 3:29Lenses and isomorphisms
- 12:10Getter and setter functions
- 22:33Map lenses implementation
- 31:29Pattern recognition in composition
- 37:50Monadic patterns and laws
- 41:29Lens package and next steps
- 50:17Map modification exercise
related talks
43mWorking efficiently with immutability
49mBetter software design with domain modelling
55mThe Shape of Shapeless (Part 2)
34mCommunication, Expression, and Types: Your Compiler as an Ally
20mStatically Contextualizing Large Language Models with Typed Holes
01h 43mLiquidHaskell Refinement Types for Haskell
50mMonad Transformers for the Easily Confused
56mThe Shape of Shapeless (Part 1)
