category-theory

Resources for learning category theory

I am going to take a course on category theory soon. What resources can you recommend for learning about it? What parts are relevant to learn and how do I learn to apply my knowledge? ...

Can liftM differ from liftA?

According to the Typeclassopedia (among other sources), Applicative logically belongs between Monad and Pointed (and thus Functor) in the type class hierarchy, so we would ideally have something like this if the Haskell prelude were written today: class Functor f where fmap :: (a -> b) -> f a -> f b class Functor f => Pointed f whe...

Examples of useful or non-trival dual interfaces

Recently Erik Meijer and others have show how IObservable/IObserver is the dual of IEnumerable/IEnumerator. The fact that they are dual means that any operation on one interface is valid on the other, thus providing a theoretical foundation for the Reactive Extentions for .Net Do other dual interfaces exist? I'm interested in any exampl...

could someone explain the connection between type covariance/contravariance and category theory?

I am just starting to read about category theory, and would very much appreciate it if someone could explain the connection between CS contravariance/covariance and category theory. What would some example categories be (i.e. what are their objects/morphisms?)? Thanks in advance? ...

Are all Haskell functors endofunctors?

I'm a bit confused, and need someone to set me straight. Lets outline my current understanding: Where E is an endofunctor, and A is some category: E : A -> A. Since all types and morphisms in Haskell are in the Hask category, is not any functor in Haskell also an endofunctor? F : Hask -> Hask. I have a good feeling that I'm wrong, a...

What mathematical duals are there are in OO programming?

Hello! If you have watched Going Deep shows of the Channel9 lately, one very frequently mentioned topic is mathematical duality in programming. TomasP has a good blog post about duality in object oriented programming. This has been since Microsoft Research found that the observer design pattern is actually a mathematical dual of the it...

A monad is just a monoid in the category of endofunctors, what's the problem?

Who first said A monad is just a monoid in the category of endofunctors, what's the problem? and on a less important note is this true and if so could you give an explanation(hopefully one that can be understood by someone who doesn't have much haskell experience). ...