Skip to main content
Module

x/fun/array.ts>getShowableArray

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

Create an instance of Showable for ReadonlyArray given an instance of Showable for A.

Examples

Example 1

import * as A from "./array.ts";
import { ShowableNumber } from "./number.ts";

const { show } = A.getShowableArray(ShowableNumber);

const result = show([1, 2, 3]); // "ReadonlyArray[1, 2, 3]"

Parameters

unnamed 0: Showable<A>

Returns

Showable<ReadonlyArray<A>>