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

x/fun/mod.ts>set.join

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

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>