
21 Nov
2008
21 Nov
'08
9:40 a.m.
It came up on IRC last night that there is no "generic" zip in Haskell. I decided to write one as an example, but it only half works. When the argument lists are all definitely of one type, instance selection works as expected; however, with numeric types, for example, things don't work out. I'm not sure how to express the idea that the result tuple determines the arguments types, with either of functional dependencies or associated types. -- _jsn |...example...| http://github.com/jsnx/haskell-demos/tree/master/generic_zip%2FGenericZip.hs