this post was submitted on 04 Jan 2024
14 points (93.8% liked)

Haskell

467 readers
3 users here now

founded 2 years ago
MODERATORS
 

Basic optics: lenses, prisms, and traversals in Haskell

Lenses are becoming an increasingly important part of a Haskeller’s toolkit. Yet, when first approaching them, people may feel buried under a myriad of different lens-like thingies, and the complexity of some of the libraries implementing those concepts, like lens.

The goal of this talk is to provide a conceptual overview of three of the most important kinds of optics, namely lenses, prisms, and traversals. For most data types, those optics can be automatically generated, something we shall discuss. Finally, we shall look at one useful application of optics: treating semi-structured data such as JSON documents.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here