The syntax for applying functions in OCaml is problemone (x+1) (y+x) z
, rather than problemone(x+1,y+x,z)
.
(x+1,y+x,z)
is interpreted as a tuple, so the error is of the tuple type 'a * 'b * 'c
. The tuple is passed as the first argument, which is expected to be int
. And since the functions are in OCaml, the compiler will not consider the application of only one argument to a function that expects multiple errors. Therefore, he only complains about the inconsistency of the type of the first argument.