Skip to content

filter

filter<A>(predicate): (s) => ReadonlySet<A>

Defined in: Utils/Uniq.ts:178

Returns a new collection containing only the items for which the predicate returns true.

A

(a) => boolean

(s): ReadonlySet<A>

ReadonlySet<A>

ReadonlySet<A>

pipe(Uniq.fromArray([1, 2, 3, 4, 5]), Uniq.filter(n => n % 2 === 0));
// ReadonlySet { 2, 4 }