Skip to main content
Module

x/fun/array.ts>combine

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

Given two arrays first and second, join them into a new array effectively doing [...first, ...second].

Examples

Example 1

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

const result = pipe(
  A.range(3, 1),
  A.combine(A.range(3, 3, -1))
); // [1, 2, 3, 3, 2, 1]

Parameters

second: ReadonlyArray<A>

Returns

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