Question: write code in haskell. thank you 3. List Operations Please define the following functions in Haskell. Please write your own code rather than using the

 write code in haskell. thank you 3. List Operations Please definewrite code in haskell. thank you

3. List Operations Please define the following functions in Haskell. Please write your own code rather than using the list functions pre-defined by Haskell. (a) Function zipi takes two lists as input and zips them together to produce a list of pairs. If the two list are not of the same length, the resultant list is of the length of the shorter one. Example: zipi (1,2,3,4) (2,3,4] - [(1,2).(2,3).(3,4)} (b) Function zip2 takes two lists as input and zip them together to produce a list of pairs. If the two list are not of the same length, the resultant list is of the length of the longer one, und duplicate the elements in the longer list when the shorter one runs out. Example: zip2 [1,2,3,6] [2,3,4) [(1,2), (2,3), (3,4),(6,6)]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!