Solution Review: Devise Random Bit Generator
This lesson discusses the solution to the challenge given in the previous lesson.
We'll cover the following...
Press + to interact
package mainimport ("fmt")func main() {ch := make(chan int)// consumer:go func() {for {fmt.Print(<-ch, " ")}}()// producer:for i:=0; i<=100000; i++ {select {case ch <- 0:case ch <- 1:}}}
In the code above, at ...