This computes i + additive and sends it to the addedStream channel.
case addedStream <- <- i + additive
This does not compile (at least not as is, and assuming the same types as implied by the first snippet). If there were just one arrow operator it would mean the same thing as above, but presumable in a select clause (given the case).
Assuming you had two channels, one you can send to and one you can receive from, you could do
sendChannel <- <-recvChannel
which means to receive one value from recvChannel (<-recvChannel) and send it to the sendChannel (sendChannel <- ...). If both the channels are chan int you could then imagine
sendChannel <- <-recvChannel + someInt
which is close to your initial example, and clearer understood as
Yeah, I’m beginning to figure it out. I’m working through “concurrency in go” and this comes from pg 110. When I use just sendChannel <- recvChannel I get what appears to be a pointer? “0xc420096060” vs.
sendChannel <- <-recvChannel I get the actual value. Thanks for tip.