General

Profile

alexbarret (Alexandre Barret)

  • Login: alexbarret
  • Registered on: 03/18/2024
  • Last sign in: 09/15/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 0 0

Activity

03/19/2024

11:12 PM Ruby Feature #8421: add Enumerable#find_map and Enumerable#find_all_map
zverok (Victor Shepelev) wrote in #note-4:
> @alexbarret There is a somewhat lesser-known trick which looks pretty close to your code:
> ...
Thanks I learned something, and it makes sense thinking about it.
Both `and` and `break` aren't ...
alexbarret (Alexandre Barret)
11:08 PM Ruby Feature #8421: add Enumerable#find_map and Enumerable#find_all_map
jeremyevans0 (Jeremy Evans) wrote in #note-5:
> `find_map` seems like a bad name as there is no map. map implies calling the same function over all elements in a collection, and in this case, there would be a single element (or none if n...
alexbarret (Alexandre Barret)
08:38 PM Ruby Feature #8421: add Enumerable#find_map and Enumerable#find_all_map
Can we reconsider introducing `#find_map` please, especially since `#find_all_map` has been introduced as `#filter_map` in Ruby in 2.7?
Here are some examples
```ruby
require "minitest/autorun"
# Option 1
def identifier(emails, ...
alexbarret (Alexandre Barret)

Also available in: Atom