Project

General

Profile

Actions

Feature #6499

closed

Array::zip

Added by prijutme4ty (Ilya Vorontsov) over 12 years ago. Updated almost 12 years ago.

Status:
Rejected
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 2 (2 open0 closed)

Related to Ruby master - Feature #19324: Enumerator.product => Enumerable#productAssignedknu (Akinori MUSHA)Actions
Is duplicate of Ruby master - Feature #8970: Array.zip and Array.productOpenActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0