Skip to main content
Module

x/fun/eq.ts>nullable

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

Creates a derivative Eq that can also compare null values in addition to the source eq.

Examples

Example 1

import { nullable, number } from "./eq.ts";

const { equals } = nullable(number);

const result1 = equals(1)(null); // false
const result2 = equals(null)(null); // true

Returns

Eq<A | null>