Project

General

Profile

Feature #5044

#zip with block return mapped results

Added by trans (Thomas Sawyer) over 9 years ago. Updated about 1 year ago.

Status:
Rejected
Priority:
Normal
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

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

Also available in: Atom PDF