func generator(values ...interface{}) func() interface{} { c := make(chan interface{}, len(values)) for _, v := range values { c <- v } return func() interface{} { return <-c } }
It's also slow.
https://groups.google.com/forum/#!topic/golang-nuts/v6m86sTR...
It's also slow.
https://groups.google.com/forum/#!topic/golang-nuts/v6m86sTR...