
9 Jun
2009
9 Jun
'09
1:39 p.m.
On Tue, 2009-06-09 at 06:05 -0700, ptrash wrote:
Hi,
I have the following two lists:
a = [1,2,3] b = ["A","B","C"]
I want a combination of the to lists:
c = [(1,"A"), (2, "B"), (3, "C")]
How can I do this?
What you want is a function with the following type signature: [t1] -> [t2] -> [(t1,t2)] Search for that in hoogle[1] and you get the function "zip" as a result[2] (as already told in this thread). Hoogle is your friend (and helps you help yourself)! :) 1: http://haskell.org/hoogle/ 2: http://haskell.org/hoogle/?hoogle=%5Ba%5D+-%3E+%5Bb%5D+-%3E+%5B%28a% 2Cb%29%5D