let log x = print_int x; log ;;log 111 222;;
I am expecting log
to print 111
and return itself and then print 222
on the second call but it does not work as expected, I am getting an error message instead. Why? How to make it work as expected?
I also tried rec
to no avail.
File "./hello.ml", line 3, characters 8-11:3 | log 111 222;; ^^^Error: This expression has type int but an expression was expected of type float