[ruby-core:90532] Re: [Ruby trunk Feature#15323] [PATCH] Proposal: Add Enumerable#filter_map

From: oleynikov@...
Date: 2018-12-14 20:22:36 UTC
List: ruby-core #90532
[email protected] wrote:
> (1..10).map { |e| e.even? ? (e * 2) : e }

Yeah, but without `#filter` this is still an array with 10 elements.

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next