Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/set.ts>join

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function join
import { join } from "https://deno.land/x/fun@v2.0.0/set.ts";

Given a ReadonlySet of ReadonlySet, flatten all of the inner sets and return a ReadonlySet.

Examples

Example 1

import * as S from "./set.ts";

const setOfSets = S.set(S.set(1, 2), S.set(3, 4), S.set(1, 4));

const result = S.join(setOfSets); // Set(1, 2, 3, 4)

Parameters

uua: ReadonlySet<ReadonlySet<A>>

Returns

ReadonlySet<A>