You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project aims to be a simple implementation of the Typeclassopedia in Scala.
(If you find a simpler way to express something then please report it or send a pull request.)
Some people learn better by seeing things in code, with examples, which is why I started doing this.
The tests are intended to be examples using typical types like Option and List, but also a custom type, Blub, to show that new types can make use of the type classes defined here.
Read The Road to the Typeclassopedia which I hope will be a gentle introduction to the ideas from examples rather than from theory.
How to Start
I suggest you start with Functor as it is the simplest class to study, then Applicative, Monad, Semigroup and Monoid.
Then have a look at Validation which is not part of the Typeclassopedia but it's useful.
Delete src/test/scala/org/typeclassopedia/Blub.scala (except for the case class itself)
Make all the tests pass again
Further Reading
This project contains a copy of The Monad.Reader Issue 13 containing Brent Yorgey's The Typeclassopedia which provides descriptions of all the types defined here.