A simple trick to understand Ruby’s lazy enumerator
You may not typically need to reach for a lazy enumerator, but it sure comes in handy when you do. But how do you know when to use it?
I believe, the answer to “when to use it” becomes crystal clear if you can visualize it.
In the latest article in Joy of Rails, I try to help you do just that: visualize how lazy enumeration works in Ruby.
https://joyofrails.com/articles/simple-trick-to-understand-ruby-lazy-enumerator
Post a comment