Here is a github gist with some exercises explaining variance of functors in Scala. Additionally, it explains variance of types over their type parameters.
I also wrote up a proof that a given functor implementation preserves morphism composition.
Here is a github gist with some exercises explaining variance of functors in Scala. Additionally, it explains variance of types over their type parameters.
I also wrote up a proof that a given functor implementation preserves morphism composition.