Koans focused on using key features of the typelevel stack. Sprinkled with some notes on theory.
To use this repository, clone or fork it and check out the classes under src/test
. They are named in
the order they should be attempted.
The tests written in each file are failing. To gain further mastery along the path to enlightenment, read
the comments and complete each test so that it passes. Any structure containing two or more underscores
__
are meant to be replaced by the learner.
Usually you only want to run the tests you're working on. To make this easy, the koan modules are numbered in increasing order, so you can run
sbt:cats-koans> testOnly *01
to run all the tests in the first module. The tests are configured to be completed in order, so all tests after the first failure are discarded.
Run all tests in this repository (not recommended usually)
sbt:cats-koans> test
The below modules are ready for testing. Please open a ticket for any issues.
- Alpha Testing
Monoid
,Typeclasses
,Functor
,Monad
-
Monad Transformers
- can reason about the effect of combined flatMap operations
- can compose multiple transformers to create arbitrarily nested stacks
-
Effects and IO
- Understand that referential transparency aids local reasoning
- Know that allocating memory is an effect
- Know that modifying memory is an effect
- Know that randomness and system calls rely on mutable memory (and so are effects)
- Can control effects by writing effectful functions
- Appreciate the need for a common effect powerful enough to handle arbitrary side-effects.
- Know to use a general-purpose 'computation monad' like IO to wrap effects.
- Understand how to use IO to suspend execution of code
-
Bracket
- Can use bracket as a pure replacement for tryFinally
- Understand ExitCase
-
Semigroupal -- computations when order doesn't matter