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

x/rimbu/core/mod.ts>Tuple.tail

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

Returns a Tuple containing all but the first element of the given tuple.

Examples

Example 1

const t = Tuple.of(1, 'a', true)
console.log(Tuple.tail(t))
// => ['a', true]

Type Parameters

T extends readonly [...unknown[]]

Parameters

tuple: readonly [unknown, ...T]
  • the source tuple

Returns

Readonly<T>