Question: Problem 1 (5 points) Write an ML function, called alternate: 'a list ? 'a list ? 'a list, that takes two lists, having the same
Problem 1 (5 points) Write an ML function, called alternate: 'a list ? 'a list ? 'a list, that takes two lists, having the same length, as input and produces an output list whose elements are alternately taken from the first and second input list respectively.
Example: alternate([1,3,5],[2,4,6]) = [1,2,3,4,5,6]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
