Skip to main content
Module

x/fun/mod.ts>fn.identity

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 fn.identity
import { fn } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { identity } = fn;

The canonical identity function. It returns whatever value was passed to it.

Examples

Example 1

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

const result1 = identity(1); // 1
const result2 = identity("Hello"); // "Hello"