import { set } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { ap } = set;
Given a ReadonlySet of functions A -> I and a ReadonlySet return a ReadonlySet by applying every function to every value A.
Examples
Example 1
Example 1
import * as S from "./set.ts";
import { pipe } from "./fn.ts";
type Person = { name: string, age: number };
const person = (name: string) => (age: number): Person => ({ name, age });
const result = pipe(
S.of(person),
S.ap(S.of("Brandon")),
S.ap(S.of(37)),
); // ReadonlySet<Person>
Parameters
ua: ReadonlySet<A>