Hello

This might be a trivial question, but I wonder if anybody knows how to write a function

proj :: (Functor f, Functor f') =>
        (f:*:f') (a,b) -> f a

where

  data a:*:b o = Pair (a o) (b o)

I think I really want to project out a component of F (AxB) x F' (AxB). However, this seems harder in Haskell than in category theory, but I am not 100% sure.

Best Wishes,
Johan Glimming

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to