Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
raganwald
· 18y ago · 0 comments
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.
Comments
[–]
kommissar
18y ago
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.