Solution Review: Summing the Integers
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 sum(x, y int, c chan int) {c <- x + y}func main() {c := make(chan int)go sum(12, 13, c)fmt.Println(<-c) // 25}
The function sum
...