Y
Hacker News
new
|
ask
|
show
|
jobs
by
ngcazz
583 days ago
I think we can go harder on the std lib :)
HANDLERS.flat_map { _1.node_names.index_with(_1) }.inject(&:merge)
(nb: assuming there exists a `.node_names` to expose the constant... just because I like always using method calls)