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

x/rimbu/mod.ts>Tuple.concat

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Tuple.concat
import { Tuple } from "https://deno.land/x/rimbu@1.2.0/mod.ts";
const { concat } = Tuple;

Returns a Tuple containing the elements of given tuple1 followed by the elements of given tuple2.

Examples

Example 1

const t1 = Tuple.of(1, 'a')
const t2 = Tuple.of(true, 5)
console.log(Tuple.concat(t1, t2))
// => [1, 'a', true, 5]

Parameters

tuple1: T1
  • the first Tuple
tuple2: T2
  • the second Tuple

Returns

readonly [...T1, ...T2]