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
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
Get step-by-step solutions from verified subject matter experts
