<TKey, T>
public
filter(null|(Closure(T): bool) $predicate = null): CollectionInterface<TKey, T>
Returns a new collection from items where $predicate returns true. If no $predicate is provided, this will just check for non-falsey values.
$predicate
true
Nexus\Collection\Collection::filter()