Proc syntax


i don't get it, what's the right answer??

floats = [1.2, 3.45, 0.91, 7.727, 11.42, 482.911]
round_down = { |float| float.floor }
ints = floats.collect(&round_down)

this was my code


Hi here

You should use uppercase P like that


what a dumb mistake ! tnx


I don't understand why 'float' references on line two are all singular and this syntax still works?
Am I missing something - how can that be?


@hkdeven I think it's because it's just a stand in placeholder argument inside the block. So, in mine, I just used |x| and x.floor and it works. I'm still figuring this stuff out so I could be wrong, but that's my understanding of it.