
On Monday 03 April 2006 08:09, David Menendez wrote:
If you look at it in terms of folds over pairs,
cata (&) (x,y) = x & y -- corresponds to uncurry ana f g x = (f x, g x) -- corresponds to (&&&)
Then you can de-forest:
hylo (&) f g x = f x & g x
-- hylo (&) f g == cata (&) . ana f g -- == uncurry (&) . f &&& g -- -- cata (&) == hylo (&) fst snd -- ana f g == hylo (,) f g
This seems remeniscent of pull-backs (or push-outs) in category theory, but I don't know enough to say for certain.
I especially like the above code after it has been automatically transformed to use the puppy operator by my email client. Actually, the more I look at it... maybe the new crop of haskell editors should define some 'haskicon' replacements. :) Daniel