The cats-effect
project defines a purely functional effect type (IO[A]
), and associated typeclasses defining its behaviour.
The ones we care about for this example are:
trait Sync[F[_]] extends MonadError[F, Throwable] {
def delay[A](a: => A): F[A]
...
}