Skip to main content
Module

x/hkts/option.ts>getShow

Functional programming tools: option, either, task, state, optics, etc.
Latest
variable getShow
import { getShow } from "https://deno.land/x/hkts@v0.0.52/option.ts";

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"

type

<A>(unnamed 0: TC.Show<A>) => TC.Show<Option<A>>