3 ms·
That's right. That's how functors work in category theory. I've seen a nice article explaining how Haskell types form a category. The objects of the category a
by grn 14y ago
That's right. That's how functors work in category theory.
I've seen a nice article explaining how Haskell types form a category. The objects of the category are types, an arrow a -> b is a function taking argument of type a and returning type b. A Haskell functor is then an endofunctor in this category (i.e. a functor from the category of types to itself). Unfortunately I cannot find the article anymore.
- gtani 14y agoI would guess you're thinking about http://blog.sigfpe.com/2009/10/what-category-do-haskell-types-and.html http://blog.sigfpe.com/2009/10/what-category-do-haskell-type... http://dorchard.wordpress.com/2011/10/18/subcategories-in-haskell-exofunctors/ http://dorchard.wordpress.com/2011/10/18/subcategories-in-ha...
- grn 14y agoThanks for the links! However I am thinking about a different article. If I remember correctly I found it somewhere in the Haskell Wiki. Wikibooks have also a similar article on the subject: http://en.wikibooks.org/wiki/Haskell/Category_theory http://en.wikibooks.org/wiki/Haskell/Category_theory