I'm new to ML so I'm doing my best to understand.
Write an ML function called alternate : '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]
This is my work : fun alternate ( x::xs,y::ys) = x::alternate(x,y);