Skip to content

Commit 399a51c

Browse files
niranjan92tmrts
authored andcommitted
concurrency/generator: use inclusive range in iteration
Fixes tmrts#23
1 parent 0ca6f66 commit 399a51c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

concurrency/generator.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ func Count(start int, end int) chan int {
99
ch := make(chan int)
1010

1111
go func(ch chan int) {
12-
for i := start; i < end ; i++ {
12+
for i := start; i <= end ; i++ {
1313
// Blocks on the operation
1414
ch <- i
1515
}

0 commit comments

Comments
 (0)