let total = ref 0 in for i = 1 to 10 do total := !total + i done; Printf.printf "Total = %d\n" !total