FilterFunction reduces the set of matched elements to those that pass the function's test. It returns a new Selection object for this subset of elements.
(f func(int, *Selection) bool)
| 30 | // FilterFunction reduces the set of matched elements to those that pass the function's test. |
| 31 | // It returns a new Selection object for this subset of elements. |
| 32 | func (s *Selection) FilterFunction(f func(int, *Selection) bool) *Selection { |
| 33 | return pushStack(s, winnowFunction(s, f, true)) |
| 34 | } |
| 35 | |
| 36 | // NotFunction removes elements from the Selection that pass the function's test. |
| 37 | // It returns a new Selection object with the matching elements removed. |