Skip to main content
Module

x/fun/mod.ts>set.getShowableSet

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

Given an instance of Showable return an instance of Showable<ReadonlySet>.

Examples

Example 1

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

const { show } = S.getShowableSet(N.ShowableNumber);

const result1 = show(S.init()); // "Set([])"
const result2 = show(S.set(1, 2, 3)); // "Set([1, 2, 3])"

Parameters

S: Showable<A>

Returns

Showable<ReadonlySet<A>>