func FilterNoGC[T any](a *[]T, keep func(t T) bool) {
	n := 0
	for _, x := range *a {
		if keep(x) {
			(*a)[n] = x
			n++
		}
	}

	*a = (*a)[:n]
}
// FilterNoGC removes any elements from a for which keep returns false.  It may not be possible to garbage collect
// elements after removal, so calling this method can lead to memory leaks.
FilterNoGC removes any elements from a for which keep returns false.  It may not be possible to garbage collect
elements after removal, so calling this method can lead to memory leaks.
// FilterNoGC removes any elements from a for which keep returns false . It may not be possible to garbage collect // elements after removal so calling this method can lead to memory leaks .
func FilterNoGC[T any](a *[]T, keep func(t T) bool) {
	n := 0
	for _, x := range *a {
		if keep(x) {
			(*a)[n] = x
			n++
		}
	}
	*a = (*a)[:n]
}
func FilterNoGC [ T any ] ( a * [ ] T , keep func ( t T ) bool ) { n := 0 for _ , x := range * a { if keep ( x ) { ( * a ) [ n ] = x n ++ } } * a = ( * a ) [ : n ] }
FilterNoGC removes any elements from a for which keep returns false.
FilterNoGC removes any elements from a for which keep returns false .