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

x/rambda/immutable.d.ts>aperture

Faster and smaller alternative to Ramda
Latest
function aperture
import { aperture } from "https://deno.land/x/rambda@9.4.1/immutable.d.ts";

It returns a new list, composed of consecutive n-tuples from a list.

Type Parameters

N extends number
T

Parameters

n: N
list: readonly T[]

Returns

ReadonlyArray<Tuple<T, N>> | readonly []

Type Parameters

N extends number

Returns

<T>(list: readonly T[]) => ReadonlyArray<Tuple<T, N>> | readonly []