9 Feb
2005
9 Feb
'05
3:06 a.m.
Hi I have a problem with contravariance in the bananas in space setting. If you take catamorphism from a function space such as A=A->A to a type such as BxC, then the negative occurrence of X in the functor GXY=X->Y swaps around BxC into B+C. This means that maybe in this particular case Meijer-Hutton's original Haskell code for cata/ana does not work, since the type for cata would force BxC and B+C to be the same type. I might be wrong about this, and I wonder anybody can comment on this. Med vänliga hälsningar / Yours Sincerely, Johan Glimming