Skip to main content
Module

x/fun/fn.ts>wrap

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function wrap
import { wrap } from "https://deno.land/x/fun@v2.0.0/fn.ts";

Create a Fn that always returns a value. This is equivalent to constant.

Examples

Example 1

import { wrap } from "./fn.ts";

const alwaysA = wrap("A");

const result = alwaysA(null); // "A"

Type Parameters

A
optional
D = unknown