Dear all,
This is a rather minor issue, but I was surprised by the following answers of the interpreter:
OCaml version 4.00.1
# ignore succ;;
Warning 5: this function application is partial,
maybe some arguments are missing.
- : unit = ()
# (fun _ -> ()) succ;;
- : unit = ()
I naively used to think the two expressions were equivalent. Reading pervasives.mli, I found that ignore is a primitive:
external ignore : 'a -> unit = "%ignore"
which means it is treated as a special case. Just for curiosity, what is the rationale for the warning in the first case?
Cheers,
Philippe.