
24 Oct
2006
24 Oct
'06
4:07 a.m.
something of the type t1 -> t2 -> t3 where t3 = f(t1, t2). Generalization of zip/zipWith. I have never seen that example.
how about generic zip?
gzipWith :: (a->b->c) -> C a -> C b -> C c
Good example. In Generic Haskell, gzipWith has type gzipWith {| t1 :: *, t2 :: *, t3 :: * |} :: (gzipWith {| t1, t2, t3 |}) => (t1,t2) -> Maybe t3 gzipWith is a rather standard generalisation (except for the Maybe) of gmap, which has type gmap {| t1 :: *, t2 :: * |} :: (gmap {| t1, t2 |}) => t1 -> t2 so it might not exhibit new properties. But maybe it does lead to problems in other approaches. -- Johan