tutorial-cat
tutorial-cat copied to clipboard
Workshop Pragmatic Introduction to Category Theory
tutorial-cat
Code for the Pragmatic Introduction to Category Theory.
Slides and video are now available online!
Installation
- clone the repo
sbt test:compilesbt run- if you see the secret message you are good to go!
Agenda
Intro
Monoid
- Define a monoid for
Int - Define a monoid for
String
sbt 'testOnly *Monoid*'
Functor
- Define a functor for
Maybe - Define a functor for
ZeroOrMore
sbt 'testOnly *Functor*'
Applicative
- Define
mapin terms ofapandpure - Define an applicative for
Maybe - Define an applicative for
ZeroOrMore
sbt 'testOnly *Applicative*'
Monad (1)
- Define
flattenusingflatMap - Define
mapusingflatMapandpure - Define
apusingflatMapandmap
Monad (2)
- Define a monad for
Maybe - Define a monad for
ZeroOrMore
sbt 'testOnly *Monad*'
Solutions
Solution of the exercises are available here