© Jay Godse 2018
Jay GodseRuby Data Processinghttps://doi.org/10.1007/978-1-4842-3474-7_2

2. Function Overview and Simple Examples

Jay Godse1 
(1)
Kanata, Ontario, Canada
 

The Ruby library includes the module Enumerable. This library contains map(), reduce(), select() , and other functions. This section will outline the syntax and meanings of the different parts of code that use these three functions.

If you can get through this section comfortably, both typing the code into irb and understanding the results, then you will be in a good position to deepen your understanding with the complex examples and reverse engineering that follow in the next chapters.

Map

This function of the Ruby Enumerable library is simple but profound. The map() method is applied ...

Get Ruby Data Processing: Using Map, Reduce, and Select now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.