The “this will give you more elements than you asked for” thing seems like a pretty big footgun
I updated the article to clarify that it only realizes the lazy structure in chunks, and it returns a sequence with the correct number of items :)
Does it know if the closure used to map is pure or not?
Nope, it has no idea. It will run the mapping function regardless. Clojure has no type system that blocks you from accidentally calling the network when you add two numbers :)
The “this will give you more elements than you asked for” thing seems like a pretty big footgun
I updated the article to clarify that it only realizes the lazy structure in chunks, and it returns a sequence with the correct number of items :)
Does it know if the closure used to map is pure or not?
Nope, it has no idea. It will run the mapping function regardless. Clojure has no type system that blocks you from accidentally calling the network when you add two numbers :)