Find and collect map, select, inject and zip – useful Ruby methods

Today I would like to share with you some methods I have learned in Ruby. They are very cool and help a lot in resolving complex problems. #map and #map! #map and #map! transform elements of an array. In my example, it iterates over each element of my_array and multiplies it by 2 and returns a … Continue reading Find and collect map, select, inject and zip – useful Ruby methods

Advertisements