fun mystery(a, b::bs) = if a = b then mystery(a, bs) else b::mystery(a, bs) | mystery(a, ) = ;What is the type of
mystery? What is the value of
mystery(3,[3,2,1,2,3])? What happens if you try
mapcan be used in ML to start with the list
[4,5,6]and produce the list
[8,8,10,10,12,12], in which each value has been "doubled" in two senses of the word: multiplied by two and repeated twice.