operator and operand don't agree [tycon mismatch] - sml assuming the wrong list type
问题 I have a pretty simple code that's supposed to transform a list of tuples (int * string), into two lists, one list of ints and one list of strings - basically a list of tuples into a tuple of lists. fun unzip_single_int[] : int list = [] | unzip_single_int(x::xs) : int list = x :: unzip_single_int(xs) fun unzip_single_string[] : string list = [] | unzip_single_string(x::xs) : string list = x :: unzip_single_string(xs) fun unzip[] : (int list * string list) = ([], []) | unzip([twopls]) : (int