Hey all.. I was wondering if somebody might give me some pointers on how to do a particular assignment.. I need to write a scipt zipPairtype L1 L2 which takes 2 lists and returns a list of pairs... such thar: > zipPairtype [1,2] [11,12,100] [Pair 1 11, Pair 2 12] <Yes, it actually prints 'Pair'> >zipPairtype [1,2,3] [100,99] [Pair 1 100, Pair 3 99] ...... Now, I already wrote a prodPair function that takes a product and returns its pair (and that works fine)..ie: > prodPair [1,2] [11,12,100] [11,24] > prodPair :: [Int] -> [Int] -> [Int] > prodPair mypair1 mypair2 = multPairs newp > where > newp = (zipPair mypair1 mypair2) Oh, and to make life more interesting, I also given a 'data pair type' > data Pair = Pair Int Int deriving Show .. This is my first attempt at haskell -- and although I am not looking for the solution, I was wondering if anyone could help me :() Thanks much! -Andrew S.
