Skip to main content
Module

x/fun/mod.ts>set.getShow

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

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

Examples

Example 1

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

const { show } = S.getShow(N.ShowNumber);

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

Parameters

S: Show<A>

Returns

Show<ReadonlySet<A>>