List.exists
takes a function and a list, not a value and a list. For testing whether a value is in a list, use List.mem
.
Your if
looks like C syntax. In OCaml you need to use then
(but you don't need the parentheses).
As a side comment, if e = true then ...
is the same as if e then ...
. If you use good names for things, the latter is usually clearer.