zip

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
839 B
Creates a new list out of the two supplied by pairing up equally-positioned items from both lists.
1 contributor
Install zip as a package?
Copied
npm i @bit/justin-capalbo.ramda.zip
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
zip (
list1:Array,
list2:Array
) : Array

Creates a new list out of the two supplied by pairing up equally-positioned items from both lists. The returned list is truncated to the length of the shorter of the two input lists. Note: zip is equivalent to zipWith(function(a, b) { return [a, b] }).

Example
R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']]
Arguments
list1: Array

The first array to consider.

list2: Array

The second array to consider.

Returns
Array

The list made by pairing up same-indexed elements of `list1` and `list2`.

Help and resources