I want to combine two 2-dimensional lists in Haskell using zip, i.e. achieve something like this
[[1,2,3], [[10, 11, 12], [[(1, 10), (2, 11), (3, 12)],
[4,5,6], `zip'` [13, 14, 15], -> [(4, 13), (5, 14), (6, 15)],
[7,8,9]] [16, 17, 18]] [(7, 16), (8, 17), (9, 18)]]
without using any functions outside the Prelude. Is there a way this can be done, using map perhaps? The problem is that one cannot map zip over two lists.
zip' = zipWith zip
Nice, isn't it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With