Skip to content

map

map<A, B>(f): (s) => ReadonlySet<B>

Defined in: Utils/Uniq.ts:161

Applies f to each item, returning a new collection of the results. Duplicate results are automatically merged.

A

B

(a) => B

(s): ReadonlySet<B>

ReadonlySet<A>

ReadonlySet<B>

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