Ruby Enumerable#lazy: Memory-Saving Pipelines With Hidden Costs
Enumerable#lazy defers map, select and other operations until values are consumed, keeping memory constant for large streams. It changes side-effect timing and adds overhead, so it helps for streaming pipelines but can hurt small collections.