Skip to main content
Module

x/fun/mod.ts>array.empty

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

Create an empty array of type A (defaulting to never).

Examples

Example 1

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

const result = A.empty<number>(); // ReadonlyArray<number>

Type Parameters

optional
A = never

Returns

ReadonlyArray<A>