diff --git a/concurrency/generator.md b/concurrency/generator.md index e9821b6..beefac5 100644 --- a/concurrency/generator.md +++ b/concurrency/generator.md @@ -6,13 +6,13 @@ ```go func Count(start int, end int) chan int { - ch := make(chan int) + ch := make(chan int) - go func(ch chan int) { - for i := start; i <= end ; i++ { - // Blocks on the operation - ch <- i - } + go func(ch chan int) { + for i := start; i <= end; i++ { + // Blocks on the operation + ch <- i + } close(ch) }(ch)