John Wiegley: Putting Lenses to Work
Bay Area Haskell · 3 位 HN 用户推荐 · 2022–2024
Good examples in "Putting lenses to work" by John Weigley: [link]
— ParetoOptimal, 2022Definitely agree on lenses being one of the more mind blowing things I've encountered and eventually grokked in programming. I would also recommend [link] as a good video on lenses in part because the latter portion has some pretty far-out examples of that deep well you mentioned.
— lgas, 2022But in easily digestible terms, it's a way to narrow your view over a collection to a subset that satisfies some property, and perhaps perform some operations on that subset. This video presentation (with a very humorous audience dynamic, might I add) serves as a great introduction by example: [link]
— turboponyy, 2024