In C++ I'd write
bool positive (int a)
{
#ifdef DEBUG
cout << "Checking the number " << a << "\n";
#endif
return a > 0;
}
In OCaml I could write
let positive x =
begin
printf "Checking the number %d\n" x;
x > 0
end
But how can I disable the printf statement when not in debug mode?