Project

General

Profile

Actions

Feature #5044

closed

#zip with block return mapped results

Added by trans (Thomas Sawyer) over 12 years ago. Updated over 4 years ago.

Status:
Rejected
Target version:
-
[ruby-core:38154]

Description

Is there any reason that #zip doesn't return results like map?

[1,2,3].zip([1,2,3]){ |a,b| a + b } #=> [2,4,6]

Currently, it just returns nil, which seems rather contrary to the return result of the non-block form.


Related issues 2 (1 open1 closed)

Related to Ruby master - Feature #4539: Array#zip_withAssignedmatz (Yukihiro Matsumoto)Actions
Related to Ruby master - Feature #16261: Enumerable#each_splat and Enumerator#splatRejectedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0