[Haskell-cafe] How to join two lists of lists?

Khrystyna Mandziy mandziy at web.de
Tue May 3 16:13:04 EDT 2005


Hi all!
I'm trying to join to lists of lists. The problem is, i would like to
get a new list of lists of tuples and not list of tuples of lists (that
what zip makes).

list1 = [[1,2],[3,4],[5,6]]
list2 = [[a,b],[c,d],[e,f]]

desiredlist = [[(1,a),(2,b)],[(3,c),(4,d)],[(5,e),(6,f)]]

Thanks for any help!



More information about the Haskell-Cafe mailing list