7 Traversals

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

7.1 Introduction to Traversals

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

How do Traversals fit into the hierarchy?

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

A bit of Nostalgia

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

From fold to traversal

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

7.2 Traversal Combinators

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Traversing each element of a container

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

More Combinators

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Traversing multiple paths at once

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Focusing a specific traversal element

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

7.3 Traversal Composition

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Exercises – Simple Traversals

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

7.4 Traversal Actions

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

A Primer on Traversable

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Traverse on Traversals

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Infix traverseOf

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Using Traversals directly

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Exercises – Traversal Actions

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

7.5 Custom traversals

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Optics look like traverse

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Our first custom traversal

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Traversals with custom logic

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Case Study: Transaction Traversal

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Exercises – Custom Traversals

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

7.6 Traversal Laws

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Law One: Respect Purity

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Law Two: Consistent Focuses

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Good Traversal Bad Traversal

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Exercises – Traversal Laws

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

7.7 Advanced manipulation

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

partsOf

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Polymorphic partsOf

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

partsOf and other data structures

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.

Exercises – partsOf

This content is not available in the sample book. The book can be purchased on Leanpub at http://leanpub.com/optics-by-example.