Lenses for the Mere Mortal: PureScript Edition
Publisher: Leanpub
Published: 2018-08-20
Format: Ebook
Copyright date: 2018
First sentence: Lens libraries, such as Haskell’s Control.Lens or PureScript’s Data.Lens, have the reputation of being hard to learn, or at least hard to learn well.
Table of contents: title: Introduction; title: Optics are useful; title: Why are optics notoriously confusing?; title: This book’s approach; title: Why PureScript?; title: Getting ready; title: About the cover; title: Your problems and questions; title: Change log; title: Thanks for the help; label: 1
title: Tuples and records (lenses for product types); label: 1.1
title: Tuples; label: 1.2
title: Records; label: 1.3
title: Composing lenses; label: 1.4
title: Composition exercise; label: 1.5
title: Types; label: 1.6
title: Composition exercise two; label: 1.7
title: Lens laws; label: 1.8
title: Law exercise; label: 1.9
title: What now?; label: 2
title: Maps (At lenses); label: 2.1
title: A custom implementation; label: 2.2
title: At.at; label: 2.3
title: Types; label: 2.4
title: Composing At lenses; label: 2.5
title: What now?; label: 3
title: Optics and refactoring (optional); label: 3.1
title: Architecture; label: 3.2
title: Optics; label: 3.3
title: Exercise; label: 3.4
title: My solution; label: 3.5
title: What now?; label: 4
title: Operating on whole collections (Traversal, part 1); label: 4.1
title: Working with all the values; label: 4.2
title: view; label: 4.3
title: Focusing on individual values; label: 4.4
title: preview; label: 4.5
title: Composing traversals; label: 4.6
title: A sort of base class; label: 4.7
title: What now?; label: 5
title: Single elements in arrays and fixed-size maps (Index); label: 5.1
title: ix, at, and Map; label: 5.2
title: Array; label: 5.3
title: Types; label: 5.4
title: Composition; label: 5.5
title: What now?; label: 6
title: Sum types (prisms); label: 6.1
title: Using prisms; label: 6.2
title: Making a prism; label: 6.3
title: Prism laws; label: 6.4
title: Value constructors with more than one argument; label: 6.5
title: Types; label: 6.6
title: Composing prisms; label: 6.7
title: Prisms aren’t just for sum types (exercises); label: 6.8
title: What now?; label: 7
title: Miscellaneous other optics; title: Appendices; title: A cheat sheet for the optic types; title: Lens; title: class At; title: Traversal; title: class Index; title: Prism; title: A catalog of compositions; title: Lens <<< optic; title: Prism <<< optic; title: Traversal <<< optic; title: At lens <<< optic; title: Index optic <<< optic; title: Identifying an optic from type spewage; title: I see Choice; title: I see Strong alone; title: I see Strong and Choice; title: I see Strong and At; title: I see Index and Wander; title: I see Wander alone; title: Notes