0
我正在爲類的函數工作,並且出現此錯誤。操作符和操作數不一致ML
錯誤:操作符和操作數不贊同[tycon失配]
運營商域: 'Z列表
操作數:' Y列表 - >「Y列表
在表達: 空tl
fun removedub(L) =
if (null L) then nil
else if (null tl(L)) then hd(L)
else if hd(L) = hd(tl(L)) then removedub(tl(L))
else hd(L) :: removedub(tl(L));
val list = ["a", "a", "b", "b", "c"];
removedub(list);
我不知道如何解決這個問題,或者真的是什麼原因導致它,任何提示?