Hi,
Is there any difference between inject(:+) and inject(&:+)
? If NO
hen how these two kind of syntax with same method? And if Yes
then why the output are same for both?
irb(main):005:0> [1, 2, 3].inject(&:+)
=> 6
irb(main):006:0> [1, 2, 3].inject(:+)
=> 6
irb(main):007:0>
Thanks,