Chapter 21 Outline

  • 21.1 Traversable

  • 21.2 The Traversable type class definition

  • 21.3 sequenceA

  • 21.4 traverse

    • 21.4.1 mapM is traverse

  • 21.5 So, what’s Traversable for?

  • 21.6 Morse code revisited

  • 21.7 Axing tedious code

  • 21.8 Do all the things

    • 28.8.1 Strength for understanding

  • 21.9 Traversable instances

    • 21.9.1 Either

    • 21.9.2 Tuple

  • 21.10 Traversable Laws

    • traverse

      • Naturality

      • Identity

      • Composition

    • sequenceA

      • Naturality

      • Identity

      • Composition

  • 21.11 Quality Control

  • 21.12 Chapter Exercises

    • 21.12.1 Traversable instances

      • Identity

      • Constant

      • Maybe

      • List

      • Three

      • Pair

      • Big

      • Bigger

      • S

    • 21.12.2 Instances for Tree

      • hints

  • 21.13 Follow-up resources

    • Jakub Arnold. Foldable and Traversable

    • Jeremy Gibbons and Bruno C. d. S. Oliveira. The Essence of the Iterator Pattern.

    • Conor McBride and Ross Paterson. Applicative programming with effects.