I'm working on a function for class, and I am getting this error.
Error: operator and operand don't agree [tycon mismatch]
operator domain: 'Z list
operand: 'Y list -> 'Y list
in expression: null 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);
I'm not sure how to fix this, or really what is causing it, any tips?