4 ms·
> But to understand Lens? Very few people actually understand Lens. That's a lie. The basics of optics can be taught to even new Haskell programmers in an hour
by kccqzy 7y ago
> But to understand Lens? Very few people actually understand Lens.
That's a lie. The basics of optics can be taught to even new Haskell programmers in an hour or so. Don't start in the deep end with generic optics with scary signatures like (Profunctor p, Functor f) => p a (f b) -> p s (f t). Start with something concrete like (String -> IO String) -> (User -> IO User) and then introduce the type variables one at a time. I've taught the basics of lenses, traversais, folds and other useful optics many times.