+ 5

Proc vs Method in Ruby

Does anybody try to use some methods (not proc or lambda) as the parameters of the other methods directly (officially called functional programming)? I tried it several times on Code Playground and always failed. Really weird! Ruby treats everything as an object and why it cannot treat methods in the same way?! If it is true, I find there is no need to introduce a proc in Ruby at all. Anyway, functional programming in Ruby is not straightforward at all.

14th Feb 2018, 11:20 PM
Bo Yang
Bo Yang - avatar
2 Respuestas
- 3
umiikot yg goy officeholder think ok devi but red try cedric thonniyathu ogfD ethirettu refinishing hu ji geniuses
15th Feb 2018, 5:25 PM
leela moka
- 3
45
15th Feb 2018, 5:25 PM
leela moka