About this course

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 fast-paced mini-course is to provide a conceptual overview of the most important kinds of optics, including 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.

This course includes:

  • Certificate of completion

    Each course of the 47 Degrees Academy includes a certificate of completion when you fulfill the videos and exercises successfully

  • Ad-hoc exercises

    We have quizzes and exercises delivered through the Intellij EduTools platform to get easier the learn the concepts, and improve the attendees' experience

  • On-demand resources

    Eleven video lessons, slides, and downloaded content for helping you to get the concepts most interactively and easily possible.

Course curriculum

  • 1

    Introduction

  • 2

    Lenses

    • Using and Composing Lenses

    • Creating Lenses

  • 3

    Optional Values

    • Affine-Traversals

    • Prisms

  • 4

    First-order

    • First-class Everything

  • 5

    Traversals and folds

    • Traversals and Folds

  • 6

    Optics in practice

    • JSON Manipulation using Optics

    • Optics and State

  • 7

    Conclusion

    • The Rest of the Optics Hierarchy