Search
We saw that we can use inject like this.
inject
In Ruby the plus sign is a method so we can write the above code like this.
Let's see some more examples of Symbol to Proc.
Symbol to Proc
This code could also be written as shown below.
Here is another example.
This code could be shortened a lot.