Functional Lenses in JavaScript
summary
Builds a tiny lenses library in plain JavaScript: implements a one-line curry function, helpers like prop and assoc, a lens constructor and the operations view/set/over, plus compose/pipe for lens composition. Demonstrates immutable updates on nested JSON (indexing into arrays and changing deep names) and shows the library works with examples, recommends Ramda and monocle-ts for production use, and cautions the demo code is educational rather than production hardened.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 3:16What are lenses
- 6:51Currying in JavaScript and its benefits
- 8:13Basic lens implementation
- 13:33Testing lenses
- 18:37Lenses for nested objects
- 22:18Composing lenses
- 27:18Lens libraries
- 29:45Functional programming libraries in JavaScript
- 30:28Fantasy Land overview
related talks
30mFunctional lenses for contemporary frameworks
57mLet's Lens - Part 2 of 5
34mFunctional JavaScript for everyone
21mEffectful Lenses: There and Back with Different Monads
49mGoing Functional with JS
35mFunctional programming and curry cooking in JS
39mFun with Functional JavaScript
30mLearning Functional Programming with JavaScript
