[Haskell-cafe] How to write (FxF' . delta) AxB --> F A

Johan Glimming glimming at kth.se
Mon Feb 7 15:30:22 EST 2005


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



More information about the Haskell-Cafe mailing list