...

/

Iterators

Iterators

Learn about iterators in Ruby and how they can be chainable.

Iterators are chainable

Methods on arrays and hashes that take a block are also called iterators. We say they iterate over the array, meaning that these methods take each element of the array and do something with it. In Ruby, iterators are chainable, adding ...