Skip to main content
Module

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

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

Examples

Example 1

import * as O from "./option.ts";

const Show = O.getShow({ show: (n: number) => n.toString() }); // Show<Option<number>>

const result1 = Show.show(O.some(1)); // "Some(1)"
const result2 = Show.show(O.none); // "None"

Parameters

unnamed 0: Show<A>