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
I am having trouble understanding Figure 3.7 on the Contramap Typeclass for Function1.
Looking at Figure 3.5, we have the typeclass instance F[B], the "function to be prepended" A => B and the resulting typeclass instance F[A]. So in the case of Figure 3.7 we have that the type produced by contramap is Function1[Pentagon, Star], which means that we are working with the Contramap Functor instance of functions consuming the base type and producing the Star type. And thus, the image on the left should be an instance of the same typeclass, and the right-hand side of the arrow should be a star too.
Another way to interpret the Figure is that the black arrows in the drawings are reversed, but I think that is a bit misleading.
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up. I think Figure 3.7 is in error. I'm going to leave this up so when we (eventually) get around to this part of the book it can be fixed.
I am having trouble understanding Figure 3.7 on the Contramap Typeclass for Function1.
Looking at Figure 3.5, we have the typeclass instance
F[B]
, the "function to be prepended"A => B
and the resulting typeclass instanceF[A]
. So in the case of Figure 3.7 we have that the type produced by contramap isFunction1[Pentagon, Star]
, which means that we are working with the Contramap Functor instance of functions consuming the base type and producing theStar
type. And thus, the image on the left should be an instance of the same typeclass, and the right-hand side of the arrow should be a star too.Another way to interpret the Figure is that the black arrows in the drawings are reversed, but I think that is a bit misleading.
The text was updated successfully, but these errors were encountered: