Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type P ¶
P is a predicate function that tests whether a value of type T satisfies some condition.
func (P[T]) And ¶
And returns a predicate that is a short-circuiting logical AND of this and the given predicates.
func (P[T]) Filter ¶
func (p P[T]) Filter(s []T) []T
Filter returns a new slice holding only the elements of s that satisfy p. Filter modifies the contents of the slice s and returns the modified slice, which may have a smaller length.
func (P[T]) FilterCopy ¶
func (p P[T]) FilterCopy(s []T) []T
FilterCopy returns a new slice holding only the elements of s that satisfy p.
Click to show internal directories.
Click to hide internal directories.