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

x/fun/mod.ts>array.getShowableArray

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

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>>