Andrei Alexandrescu: > This is a great example that I don't have the time to look into now.
It's a nice example, and I know you don't have a lot of time to implement it now. > Currently Phobos doesn't have the means to compute the cross-product of > ranges. The idea is to have standard means in Phobos to implement that kind delayed access to the lazily generated sequence. I have already shown this topic here: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=103682 Partially related: in the meantime someone has implemented my idea of vectorized lazyness, it's called "Chunked Sequences" in Clojure 1.1: http://www.infoq.com/news/2009/12/clojure-11-rc1-transients More (don't save this, click on it): http://clojure.googlegroups.com/web/chunks.pdf Despite your good intelligence Phobos2 will need some tuning and refinement, they are far from being battle-tested :-) "Small" examples like those two ones may help. Bye, bearophile