Skip to main content
Module

x/fun/array.ts>isEmpty

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

This predicate over ReadonlyArray returns true when called with an empty array, otherwise it returns false.

Examples

Example 1

import * as A from "./array.ts";

const arr1 = A.empty<number>();
const arr2 = A.of(1);

const result1 = A.isEmpty(arr1); // true
const result2 = A.isEmpty(arr2); // false

Parameters

ua: ReadonlyArray<A>

Returns

boolean