After reading: What does `&method(:method_ name)` mean in ruby?, I somewhat understand you can pass methods into the &method but is it possible to pass arguments into, in this case, method_name?
Asked
Active
Viewed 172 times
0
-
Related: https://stackoverflow.com/questions/23695653/can-you-supply-arguments-to-the-mapmethod-syntax-in-ruby?rq=1 – Jordan Running Aug 23 '17 at 17:51
-
`[1].map &method(:puts)` is passing `1` as an argument already. it's not baked into the syntax to pass additional args, but you can use higher-order functions or zip. – max pleaner Aug 23 '17 at 18:05