In a map, I can call a method on the passed-in value using the convenient &: notation:
nums = (0..10).to_a
strs = nums.map(&:to_s)
Is there something similar for calling a function with the value passed in as the first argument?
nums = (0..10).to_a
nums.each(puts) # error!
use this:
but actually it’s not much shorter 🙂