Let’s say I have a bunch of nested let…in statements. I noticed that if I have
(* a bunch of let... in above *) let test = expr1 in (* a bunch of let ... in below *)
I get this
Error (warning 26): unused variable test, yet when I change it to
let _ = expr1 in ... or
let () = expr1 in ... there are no error messages.
let _ = is pattern matching for anything and
let () = is pattern matching for anything of type unit, but does this mean that my
expr1 is just being executed anywhere? Is it being called once?