
It's covariant if the parameter is to the left of an even number of arrows. For instance (-> a) is co, (a ->) is contra, (a -> b) -> b is co wrt a and neither co nor contra wrt b, etc. Read the c#-related stuff on variance, I am sure it is completely relevant.
08.01.2011, в 13:23, C K Kashyap
Hi,
Thanks to Luke Palmer's explanation. I got a better idea of functors. I just want to ratify my understanding of what a functor is - according to category theory, functors are arrows between categories ... these arrows map objets and arrows from one category into another.
So, would it be right to say that the list type constructor + the map function form the functor? Saying "list is a functor then is a convenient approximation right?
In this context, could someone please point me to some writeup on co-variant/contravariant type constructors? Googling for it seems to only give a lot of C++/Java/C# hits.
Regards, Kashyap
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe