Comment Comment by tyho The single example given here is incorrect. Since Go 1.22 loop variables have per-iteration scope, the "broken" code is deterministic and correct.https://go.dev/blog/loopvar-preview parent tyho 1 year ago
https://go.dev/blog/loopvar-preview