[Haskell-cafe] Functor and Haskell

Daryoush Mehrtash dmehrtash at gmail.com
Tue Apr 21 18:48:15 EDT 2009


In category theory functors are defined between two category of C and D
where every object and morphism from C is mapped to D.


I am trying to make sense of the above definition with functor class in
Haskell.   Let say I am dealing with List type.  When I define List to be a
instance of a functor I am saying the source category (C) is Haskell types
and the destination category is List (D).    In this the "fmap" is
implementation of the mapping between every morphism in my Haskell Categroy
(C) to morphism in  List cataegory (D).   With type constructor I also have
the mapping of types (objects in Haskell Category, or my source cataegroy C)
to List category (D).  So my functor in the catarogy sense is actually the
fmap and type constructor.  Am I remotely correct?

If this is correct.... With this example, then can you then help me
understand the transformation between functors and natural
transformations?     Specifically, what does it means to have two different
functors between Haskell cateogry and List category?

Thanks,

Daryoush
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090421/039b606a/attachment.htm


More information about the Haskell-Cafe mailing list