Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/option.ts>getShowable

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

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

Examples

Example 1

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

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

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

Parameters

unnamed 0: Showable<A>