Skip to main content
Module

x/fun/mod.ts>option.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 option.getShow
import { option } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { getShow } = option;

Generates a Show module for an option with inner type of A.

Examples

const Show = getShow({ show: (n: number) => n.toString() }); // Show<Option> const a = Show.show(some(1)); // "Some(1)" const b = Show.show(none); // "None"

Parameters

unnamed 0: Show<A>