This problem is supposed to be coded in Standard ML, I tried this
fun exists (x, L) = if null L then false else if x = hd(L) then true else exists(x, tl(L));
but I get this error ‘stdIn:27.52 Warning: calling polyEqual’.
1. exists -15% This function should return true if the first argument is a member of the second argument and have type (”a”a list) ->bool. Explain in a comment why the typeis (”a”a list) ->bool and not (‘a’a list) bool Note: this function is not required to be tail-recursive. Examples exists (1,1) false > exists (1,(1,2,31) true exists ((1],1]1) true > exists ((1), [[3),]); false exists “c”,”b”,”c”,”z”]): true