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

x/fun/mod.ts>eq.record

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

Creates a Eq that compares readonly records with items that have the type compared in the supplied eq.

Examples

Example 1

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

const { equals } = record(number);

const result1 = equals({ one: 1 })({ one: 2 }); // false
const result2 = equals({ one: 1 })({ one: 1 }); // true

Returns

Eq<ReadonlyRecord<A>>