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);
我不知道如何解决这个问题,或者真的是什么原因导致它,任何提示?