Commit 2fdbf0d5 authored by Rob Pike's avatar Rob Pike

fix a couple of minor errors

SVN=126938
parent d0cf215b
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package Main package main
// Send the sequence 2, 3, 4, ... to channel 'ch'. // Send the sequence 2, 3, 4, ... to channel 'ch'.
func Generate(ch *chan> int) { func Generate(ch *chan> int) {
...@@ -30,13 +30,13 @@ func Sieve() { ...@@ -30,13 +30,13 @@ func Sieve() {
go Generate(ch); // Start Generate() as a subprocess. go Generate(ch); // Start Generate() as a subprocess.
for { for {
prime := <ch; prime := <ch;
print "%d\n", prime; print prime, "\n";
ch1 := new(chan int); ch1 := new(chan int);
go Filter(ch, ch1, prime); go Filter(ch, ch1, prime);
ch = ch1 ch = ch1
} }
} }
func Main() { func main() {
Sieve() Sieve()
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment