Package: effect
Module: Tuple
Concatenates two tuples into a single tuple.
When to use
Use to append all elements from one tuple to another tuple.
Details
The result type is [...T1, ...T2], preserving all element types from both
tuples. Neither input tuple is mutated; a fresh tuple is returned.
Example (Concatenating tuples)
import { pipe, Tuple } from "effect"
const result = pipe(Tuple.make(1, 2), Tuple.appendElements(["a", "b"] as const))
console.log(result) // [1, 2, "a", "b"]
See
appendElement – append a single elementSignature
declare const appendElements: { <const T2 extends ReadonlyArray<unknown>>(that: T2): <const T1 extends ReadonlyArray<unknown>>(self: T1) => [...T1, ...T2]; <const T1 extends ReadonlyArray<unknown>, const T2 extends ReadonlyArray<unknown>>(self: T1, that: T2): [...T1, ...T2]; }
Since v4.0.0