Skip to main content
Module

x/fun/mod.ts>eq.array

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

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

Examples

Example 1

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

const { equals } = array(number);

const result1 = equals([1, 2])([1, 2, 3]); // false
const result2 = equals([1, 2])([1, 2]); // true

Returns

Eq<ReadonlyArray<A>>