When using OCaml, I almost always use the underscore in let _ = exp, especially when the result is expnot important, but the calculation inside it. For instance:
let _ = print_endline "abc" in
...
let _ = a: =! a + 1 in
...
let _ = do_some_thing ... in
So, I'm just wondering if there is any side effect using it let _ = ...?
source
share