Skip to content

Instantly share code, notes, and snippets.

@sunilnandihalli
Created April 6, 2011 01:10
Show Gist options
  • Select an option

  • Save sunilnandihalli/904935 to your computer and use it in GitHub Desktop.

Select an option

Save sunilnandihalli/904935 to your computer and use it in GitHub Desktop.
package main
func main() {
var( a = [...]int {81,32,45}
chin = make(chan int)
)
f1:=func() {
for d:=range chin {
println("d : %d" ,d);
}
}
f2:=func() {
for i:= range a {
chin<- i;
}
}
go f1()
f2()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment