Project

General

Profile

Feature #6499

Array::zip

Added by prijutme4ty (Ilya Vorontsov) about 8 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Target version:
[ruby-core:45252]

Description

Sometimes it's more natural to have Array::zip rather than Array#zip. Otherwise first array of list became unnecessary dedicated
For example
cols = first_row.zip(second_row,third_row,fourth_row)
have more natural analog:
cols = Array.zip(first_row,second_row,third_row,fourth_row)

Implementation is obvious:
def Array.zip(first,*rest)
first.zip(*rest)
end


Files

array_product_zip.pdf (53.9 KB) array_product_zip.pdf claytrump (Clay Trump), 07/01/2012 07:59 AM

Related issues

Is duplicate of Ruby master - Feature #8970: Array.zip and Array.productOpenActions

Also available in: Atom PDF