Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/mod.ts>array.init

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function array.init
import { array } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { init } = array;

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

Examples

Example 1

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

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

Type Parameters

optional
A = never

Returns

ReadonlyArray<A>