Created
December 1, 2013 11:35
-
-
Save Cergoo/7732471 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for x := range container.Iter() { ... | |
func (c *container) Iter () <-chan item { | |
ch := make(chan item); | |
go func () { | |
for i := 0; i < c.size; i++ { | |
ch <- c.items[i] | |
} | |
} (); | |
return ch | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment