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

x/rambda/mod.ts>zip

Faster and smaller alternative to Ramda
Go to Latest
function zip
import { zip } from "https://deno.land/x/rambda@9.2.1/mod.ts";

It will return a new array containing tuples of equally positions items from both x and y lists.

The returned list will be truncated to match the length of the shortest supplied list.

Parameters

x: K[]
y: V[]

Returns

KeyValuePair<K, V>[]

Returns

<V>(y: V[]) => KeyValuePair<K, V>[]