func AppleFilter(in <-chan Apple, out chan<- Apple, p func(Apple) bool) {
	for v := range in {
		if p(v) {
			out <- v
		}
	}
	close(out)
}
// AppleFilter filters a stream of Apple, silently dropping elements that do not match the predicate p.
// When the sender closes the input channel, the output channel is closed then the function terminates.
//
// It is part of the Plumbing function suite for Apple.
AppleFilter filters a stream of Apple, silently dropping elements that do not match the predicate p.
When the sender closes the input channel, the output channel is closed then the function terminates.

It is part of the Plumbing function suite for Apple.
// AppleFilter filters a stream of Apple silently dropping elements that do not match the predicate p . // When the sender closes the input channel the output channel is closed then the function terminates . // // It is part of the Plumbing function suite for Apple .
func AppleFilter(in <-chan Apple, out chan<- Apple, p func(Apple) bool) {
	for v := range in {
		if p(v) {
			out <- v
		}
	}
	close(out)
}
func AppleFilter ( in <- chan Apple , out chan <- Apple , p func ( Apple ) bool ) { for v := range in { if p ( v ) { out <- v } } close ( out ) }
AppleFilter filters a stream of Apple, silently dropping elements that do not match the predicate p.
When the sender closes the input channel, the output channel is closed then the function terminates.
AppleFilter filters a stream of Apple silently dropping elements that do not match the predicate p . When the sender closes the input channel the output channel is closed then the function terminates .