General

Profile

tny (Tony Sunny)

  • Registered on: 11/20/2018
  • Last connection: 11/20/2018

Issues

Activity

11/20/2018

02:29 PM Ruby trunk Feature #15323: [PATCH] Proposal: Add Enumerable#filter_map
Could't we use reduce for this?
~~~ ruby
(1..10).reduce([]) { |a, i| i.even? ? a << (i * 2) : a }
~~~
tny (Tony Sunny)

Also available in: Atom