Skip to content

Instantly share code, notes, and snippets.

@campoy
Created January 29, 2018 07:09
Show Gist options
  • Save campoy/4bbae631b6142142ea4c8c46daf46f21 to your computer and use it in GitHub Desktop.
Save campoy/4bbae631b6142142ea4c8c46daf46f21 to your computer and use it in GitHub Desktop.
func main() {
a := asChan(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
b := asChan(10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
c := asChan(20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
for v := range merge(a, b, c) {
fmt.Println(v)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment