Re: Lazy step ...

2008-10-19 Thread Achim Passen
Hi Steve, thanks for your answer! Am 19.10.2008 um 17:13 schrieb Stephen C. Gilardi: > That looks strictly better than the other examples to me. If you're > willing and if you send a Contributer Agreement to Rich, I'd like to > adopt it in clojure.contrib.lazy-seqs. In the meantime, the wik

Re: Lazy step ...

2008-10-19 Thread Stephen C. Gilardi
On Oct 19, 2008, at 8:49 AM, Achim Passen wrote: > (def fibs (lazy-cat [0 1] (map + fibs (rest fibs That looks strictly better than the other examples to me. If you're willing and if you send a Contributer Agreement to Rich, I'd like to adopt it in clojure.contrib.lazy-seqs. In the

Lazy step ...

2008-10-19 Thread Achim Passen
... is not some new form of dance music from the UK, but what appears to be a recurring - dare i say - pattern in the definition of lazy sequences: the combination of lazy-consing and a step function. There are plenty of these in boot.clj and in contrib's lazy-seq.clj. Here's an example (po