func Pipe(from <-chan type T, to chan<- T) {
	for x := range from {
		to <- x
	}
	close(to)
}
Pipe redirects all the data from one channel to another one.
package main
import "fmt"
func Elems(a ...type T) <-chan T {
	ch := make(chan T)
	go func() {
		for _, x := range a {
			ch <- x
		}
		close(ch)
	}()
	return ch
}