Lazy enumerables seem magical when you first encounter them. In fact, even when you start unravelling the pieces that make up lazy enumerables, you will undoubtedly find interesting bits of Ruby that you might not have otherwise encountered.
Before writing this chapter, I had never encountered the Enumerator::Yielder, Enumerator::Generator, or Fiber classes. Thankfully, the Rubinius implementation of Enumerable was a great help. Learning about the behavior of Fiber.yield was the “aha!” moment for me.
Ruby is a language that goes the extra mile to provide syntax that tries to do a lot with little ceremony, yet somehow manages to find just the right balance to make things very readable.
Beneath the pretty syntax ...