scala-with-cats
scala-with-cats copied to clipboard
scala with cats 一书的笔记、习题
scala-with-cats
scala with cats 一书的笔记、习题
-
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
-
Chapter 4 Monads
- 4.1 What is a Monad?
- 4.2 Monad 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
- 7.1 Foldable
- 7.2 Traverse
- 7.3 Summary
-
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.2 Implementing foldMap
- 9.3 Parallelising foldMap
- 9.4 Summary
-
Chapter 10 Case Study: Data Validation
- 10.1 Sketching the Library Structure
- 10.2 The Check Datatype
- 10.3 Basic Combinators
- 10.4 Transforming Data
- 10.5 Kleislis
- 10.6 Summary
-
Chapter 11 Case Study: CRDTs
- 11.1 Eventual Consistency
- 11.2 The GCounter
- 11.3 Generalisation
- 11.4 Abstracting GCounter to a Type Class
- 11.5 Abstracting a Key Value Store
- 11.6 Summary