Re: Creating a generator (golang) Programming Computer Science by vegaseat …quot; // generator using a channel and a goroutine func fib(n int) chan int { // … { fmt.Println("A Fibonacci generator via channel/goroutine:") // function fib() returns a channel // …val) } } /* A Fibonacci generator via channel/goroutine: The first 3 Fibonacci numbers: 0 1 1 … Creating a generator (golang) Programming Computer Science by vegaseat Generators are rather familiar objects in Python. Generators supply data on demand. Using Go you can create a generator with a goroutine and a channel. Here the goroutine is an anonymous function within a function, simple to implement. Re: Google Go OOP Community Center Geeks' Lounge by vegaseat …() { // create a new channel ch := make(chan int) // launch Generate goroutine go Generate(ch) // get the first 10 primes for i…