Hacker News with Generative AI: Lazy Evaluation

A visual demo of Ruby's lazy enumerator (joyofrails.com)
In this article, we'll explore a simple visual trick to help understand how lazy enumeration works in Ruby.
A visual demo of Ruby's lazy enumerator (joyofrails.com)
In this article, we'll explore a simple visual trick to help understand how lazy enumeration works in Ruby.
Clojure Don'ts: Concat (stuartsierra.com)
concat is a tricky little function. The name suggests a way to combine two collections. And it is, if you have only two collections. But it’s not as general as you might think. It’s not really a collection function at all. It’s a lazy sequence function. The difference can be important.