I have a simple function:
let rec ap x y = if x < 10 then 12 else ap((x-1) (y));;
but the error I keep on getting is:
Error: This expression has type int
This is not a function; it cannot be applied.
I've been stuck on this for 2 hours now, i can not figure out why this does not work?
Also i just simplified the function, because in my actual ocaml code, the problem boils down to this. I'm not sure if this has to do with currying, but Can someone please explain why this is happening?
(x-1)
. – Martin Jambon