I’m trying to solve a problem in ml and I’m slightly stuck. forgive me that this is trivial code, but answering it will solve most of my problem.
Code:
val sorted = ([3, 2, 1], [5, 8, 4]);
fun loop ([]) = []
| loop (x::xs) = [3] @ [4];
loop sorted;
Error:
Error-Can't unify 'a list with int list * int list (Incompatible types) Found near loop (sorted)
Static errors (pass2)
sortedis a tuple of two lists.looptakes a list argument