Small Scala 3 examples of hand-written functional typeclasses:
Functor.scala,Applicative.scala, andMonad.scaladefine the abstractions and common collection helpers.IdentityMonad.scalaandReaderMonad.scalaprovide Identity and Reader instances.Typeclass.scalademonstratesAreaandShowtypeclasses with rectangle and circle instances;TypeclassDemo.scalais the runnable demonstration.catseffect/HelloWorld.scalais a minimal Cats Effect application.
Run the test suite with sbt test. Run an example with sbt run and select the main
class when prompted (for example, typeclassDemo).