func Filter(dst, src []float64, f func(v float64) bool) []float64 {

	if dst == nil {
		dst = make([]float64, 0, len(src))
	}

	dst = dst[:0]
	for _, x := range src {
		if f(x) {
			dst = append(dst, x)
		}
	}

	return dst
}
// Filter creates a slice with all the elements x_i of src for which f(x_i) is true.
// Filter uses dst as work buffer, storing elements at the start of the slice.
// Filter clears dst if a slice is passed, and allocates a new slice if dst is nil.
Filter creates a slice with all the elements x_i of src for which f(x_i) is true.
Filter uses dst as work buffer, storing elements at the start of the slice.
Filter clears dst if a slice is passed, and allocates a new slice if dst is nil.
// Filter creates a slice with all the elements x_i of src for which f ( x_i ) is true . // Filter uses dst as work buffer storing elements at the start of the slice . // Filter clears dst if a slice is passed and allocates a new slice if dst is nil .
func Filter(dst, src []float64, f func(v float64) bool) []float64 {
	if dst == nil {
		dst = make([]float64, 0, len(src))
	}
	dst = dst[:0]
	for _, x := range src {
		if f(x) {
			dst = append(dst, x)
		}
	}
	return dst
}
func Filter ( dst , src [ ] float64 , f func ( v float64 ) bool ) [ ] float64 { if dst == nil { dst = make ( [ ] float64 , 0 , len ( src ) ) } dst = dst [ : 0 ] for _ , x := range src { if f ( x ) { dst = append ( dst , x ) } } return dst }
Filter creates a slice with all the elements x_i of src for which f(x_i) is true.
Filter creates a slice with all the elements x_i of src for which f ( x_i ) is true .