Skip to main content
Module

x/fun/mod.ts>array.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 array.getShow
import { array } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { getShow } = array;

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

Examples

Example 1

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

const { show } = A.getShow(ShowNumber);

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

Parameters

unnamed 0: Show<A>

Returns

Show<ReadonlyArray<A>>