Code for the Pragmatic Introduction to Category Theory
.
Slides and video are now available online!
- clone the repo
sbt test:compile
sbt run
- if you see the secret message you are good to go!
- Define a monoid for
Int
- Define a monoid for
String
sbt 'testOnly *Monoid*'
- Define a functor for
Maybe
- Define a functor for
ZeroOrMore
sbt 'testOnly *Functor*'
- Define
map
in terms ofap
andpure
- Define an applicative for
Maybe
- Define an applicative for
ZeroOrMore
sbt 'testOnly *Applicative*'
- Define
flatten
usingflatMap
- Define
map
usingflatMap
andpure
- Define
ap
usingflatMap
andmap
- Define a monad for
Maybe
- Define a monad for
ZeroOrMore
sbt 'testOnly *Monad*'
Solution of the exercises are available here