Question: Programming in ml Write a function named ziplists that takes two input lists and returns a list of pairs. The returned list is constructed by

Programming in ml
 Programming in ml Write a function named ziplists that takes two

Write a function named ziplists that takes two input lists and returns a list of pairs. The returned list is constructed by pairing together respective, by position, elements of the two input lists. If either list is exhausted before the other (i.e, the lists do not contain the same number of elements), then raise an UnbalancedZip exception (you must define this exception in your solution file). (You cannot use ListPair.zip in your solution.) For example -ziplists [1,2,3] [#"a",'b", #"c"); - zipLists [3, 2][4, 5, 6] UnbalancedZip exception

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!