diff --git a/CommonMistakes.md b/CommonMistakes.md index 770c3cf2..f84c8769 100644 --- a/CommonMistakes.md +++ b/CommonMistakes.md @@ -6,7 +6,7 @@ When new programmers start using Go or when old Go programmers start using a new # Using goroutines on loop iterator variables -When iterating in Go, one might also be tempted to use goroutines to process data in parallel. For example, you might write the following code: +When iterating in Go, one might also be tempted to use goroutines to process data in parallel. For example, you might write the following code (TODO: What is wrong with example from the following code?): ```go for val := range values { go val.my_method() @@ -62,4 +62,4 @@ for i := 1; i <= 10; i++ { Even though the closures all still close over the same variable (in this case, ` i `), they are executed before the variable changes, resulting in the desired behavior. -http://golang.org/doc/go_faq.html#closures_and_goroutines +http://golang.org/doc/go_faq.html#closures_and_goroutines \ No newline at end of file