Oh, All the things you'll traverse
summary
Explains how cats’ Traverse and related type classes actually flip nested types (turns List[Future[A]] into Future[List[A]]) and gives concrete code patterns: use simulacrum for typeclass syntax, use Traverse instead of map+sequence for speed, use ValidatedNel to validate many lines with accumulated errors in one expression, implement a parallel fold by grouping because associativity lets independent combines run concurrently, and use NonEmptyList plus semigroups to get safe reduce/max without runtime exceptions.
AI-written summary · about
chapters (18)
- 0:00Start
- 1:50Ad Hoc Polymorphism
- 6:09Mono Type Class
- 9:39Implicit Derivation
- 11:04Type Classes versus Subtyping
- 17:01Right Identity
- 19:25Functors
- 20:11Type Constructors
- 21:08Monoidal Functors
- 23:35Future Dot Sequence
- 27:45Associativity
- 29:01Foldable Type Class
- 31:25Traverse Function
- 32:22Type Lambdas
- 37:42Semigroups
- 40:53Semi Grupo Functors
- 43:34Urgent Questions
- 43:51Why Do You Annotate the Type Class
related talks
31mTRAVERSALS FOR ALL OCCASIONS
46mOptimusPrimeT
31mCool toolz in the Scalaz and Cats toolboxes
01h 03mIntro to FP in Scala: Exploring a Toolbox for Solving Problems - Part 4 of 6
45mHOW I UNDERSTOOD MONAD TRANSFORMERS
44mTelling the Truth with Types
33mFunctional Patterns and Gems in Scala
34mScalaz 102 Level Up Your Scalaz Foo!
