Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

map

import { map } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/set.ts";

Given a function A -> I and a ReadonlySet return a new ReadonlySet where the values were created by passing each A through the A -> I function.

@example
import * as S from "./set.ts";
import { pipe } from "./fn.ts";

const set = S.set("hello", "world", "goodbye");

const result = pipe(
  set,
  S.map(s => s.length),
); // Set(5, 7);
function map<A, I>(fai: (a: A) => I): (ua: ReadonlySet<A>) => ReadonlySet<I>;
§
map<A, I>(fai: (a: A) => I): (ua: ReadonlySet<A>) => ReadonlySet<I>
[src]

§Type Parameters

§Parameters

§
fai: (a: A) => I
[src]

§Return Type

§
(ua: ReadonlySet<A>) => ReadonlySet<I>
[src]