This repo contains annotated code for my reading of Scala With Cats by Noel Walsh and Dave Gurnell.
-
Chapter 1: Introduction
- 1.1 Anatomy of a Type Class
- 1.2 Working With Implicits
- 1.3 Exercise: Printable Library
- 1.4 Meet Cats
- 1.5 Example: Eq
- 1.6 Controlling Instance Selection
- 1.7 Summary
-
Chapter 2: Monoids and Semigroups
- 2.1 Definition of a Monoid
- 2.2 Definition of a Semigroup
- 2.3 Exercise: The Truth About Monoids
- 2.4 Exercise: All Set for Monoids
- 2.5 Monoids in Cats
- 2.6 Applications of Monoids
- 2.7 Summary
-
Chapter 3: Functors
- 3.1 Examples of Functors
- 3.2 More Examples of Functors
- 3.3 Definition of a Functor
- 3.4 Aside: Higher Kinds and Type Constructors
- 3.5 Functors in Cats
- 3.6 Contravariant and Invariant Functors
- 3.7 Covariant and Invariant in Cats
- 3.8 Aside: Partial Unification
- 3.9 Summary
-
Chapter 4: Monads
- 4.1 What is a Monad?
- 4.2 Monads in Cats
- 4.3 The Identity Monad
- 4.4 Either
- 4.5 Aside: Error Handling and MonadError
- 4.6 The Eval Monad
- 4.7 The Writer Monad
- 4.8 The Reader Monad
- 4.9 The State Monad
- 4.10 Defining Custom Monads
- 4.11 Summary
-
Chapter 5: Monad Transformers
- 5.1 Exercise: Composing Monads
- 5.2 A Transformative Example
- 5.3 Monad Transformers in Cats
- 5.4 Exercise: Monads: Transform and Roll Out
- 5.5 Summary
-
Chapter 6: Semigroupal and Applicative
- 6.1 Semigroupal
- 6.2 Apply Syntax
- 6.3 Semigroupal Applied to Different Types
- 6.4 Validated
- 6.5 Apply and Applicative
- 6.6 Summary
-
Chapter 7: Foldable and Traverse
-
Chapter 8: Case Study: Testing Asynchronous Code
- 8.1 Abstracting over Type Constructors
- 8.2 Abstracting over Monads
- 8.3 Summary
-
Chapter 9: Case Study: Map-Reduce
- 9.1 Parallelizing map and fold
- 9.1 Implementing foldMap
- 9.1 Parallelising foldMap
- 9.1 Summary
-
Chapter 10: Case Study: Data Validation
-
Chapter 11: Case Study: CRDTs