N1njturt1e/core-types — pull request #2 by N1njturt1e (2014-12-17 07:21:45+00:00)
Title: Block test completed

I got everything to pass, but I have some syntax questions:

I get why the answer for the first exercise below is 13, but in the second exercise the array inside the parentheses is confusing me. 13 is correct for both exercises so I guess this is a syntax question.

assert_equal 13, Proc.new { |n1, n2| n1 + n2 }.call(10, 3)

assert_equal 13, Proc.new { |n1, n2| n1 + n2 }.call([10, 3])

It’s like on line 38 the (&loud) is taking the block on line 36 and running it once for each element in the array such that it is asking the same exact thing as the code on line 37, but I’m not sure what the & sign is doing so this is a syntax question too I think.

Similarly, I’m not sure what the & is doing on lines 43 and 46