Open lefessan opened 6 years ago
It would be nice to catch this:
let f l = let acc = ref 0 in let rec g l = match l with | [] -> () | a::r -> acc := !acc + a; g r in g l, !acc
g has a side effect on acc, but the result depends on the execution order in tuples.
g
And a variant of this is:
let f l = let acc = ref 0 in let rec g l = match l with | [] -> () | a::r -> acc := !acc + a; g r in let res = g l, !acc in res
It would be nice to catch this:
g
has a side effect on acc, but the result depends on the execution order in tuples.