func NewStream(slice interface{}) *gollection {
	next := &gollection{
		ch: make(chan interface{}),
	}

	sv := reflect.ValueOf(slice)
	if sv.Kind() != reflect.Slice {
		return &gollection{
			err: fmt.Errorf("gollection.NewStream called with non-slice value of type %T", slice),
		}
	}

	go func() {
		// initialze next stream type
		next.ch <- sv.Type()

		for i := 0; i < sv.Len(); i++ {
			next.ch <- sv.Index(i).Interface()
		}
		close(next.ch)
	}()
	return next
}
// NewStream returns a gollection instance which can method chain *parallel* specified by some type of slice.
NewStream returns a gollection instance which can method chain *parallel* specified by some type of slice.
// NewStream returns a gollection instance which can method chain * parallel * specified by some type of slice .
func NewStream(slice interface{}) *gollection {
	next := &gollection{
		ch: make(chan interface{}),
	}
	sv := reflect.ValueOf(slice)
	if sv.Kind() != reflect.Slice {
		return &gollection{
			err: fmt.Errorf("gollection.NewStream called with non-slice value of type %T", slice),
		}
	}
	go func() {
		next.ch <- sv.Type()
		for i := 0; i < sv.Len(); i++ {
			next.ch <- sv.Index(i).Interface()
		}
		close(next.ch)
	}()
	return next
}
func NewStream ( slice interface { } ) * gollection { next := & gollection { ch : make ( chan interface { } ) , } sv := reflect . ValueOf ( slice ) if sv . Kind ( ) != reflect . Slice { return & gollection { err : fmt . Errorf ( " " , slice ) , } } go func ( ) { next . ch <- sv . Type ( ) for i := 0 ; i < sv . Len ( ) ; i ++ { next . ch <- sv . Index ( i ) . Interface ( ) } close ( next . ch ) } ( ) return next }
NewStream returns a gollection instance which can method chain *parallel* specified by some type of slice.
NewStream returns a gollection instance which can method chain * parallel * specified by some type of slice .
// initialze next stream type