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

x/rimbu/mod.ts>Tuple.first

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

Returns the first element of a Tuple.

Examples

Example 1

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

Parameters

tuple: T
  • the source tuple