Hacker News new | ask | show | jobs
by raganwald 6683 days ago
Actually, it's &(:+) not &:(+). The & takes its argument and converts from a Proc to a block. :+ is a symbol that implements the method #to_proc to give you a block that sums its receiver and its argument.
1 comments

Oh, cool. I knew the colon meant a Ruby symbol, but I did not know that you could use & to convert a Proc to block.