Advanced Building Block Project - Ruby


#1

I just finished this project and would be very thankful for correction of my code.

The two last assignments of the of the project where:

Modify your #my_map method to take a proc instead.
Modify your #my_map method to take either a proc or a block. It won’t be necessary to apply >both a proc and a block in the same #my_map call since you could get the same effect by >chaining together one #my_map call with the block and one with the proc. This approach is also >clearer, since the user doesn’t have to remember whether the proc or block will be run first. So if >both a proc and a block are given, only execute the proc.

My code seams to work with a proc or a bloc without modification, but I don’t know why. Thanks for taking a look and validating this project.