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

x/fun/mod.ts>array.append

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

Create a new array by appending an item to the end of an existing array.

Examples

Example 1

import * as A from "./array.ts";
import { pipe } from "./fn.ts";

const result = pipe(
  [1, 2, 3],
  A.append(4),
); // [1, 2, 3, 4]

Returns

(ua: ReadonlyArray<A>) => ReadonlyArray<A>