Re: lazy-seq and recursion.

2011-12-17 Thread Stephen Compall
On Fri, 2011-12-16 at 16:10 +0100, Tassilo Horn wrote: > A lazy seq is basically a sequence of the first element and a "thunk", > where a thunk is a function without parameters that knows how to > calculate the rest of the lazy sequence. When you call `rest' or `next' > on a lazy seq, that thunk i

Re: lazy-seq and recursion.

2011-12-17 Thread Narvius
Hey, I got myself a copy of The Joy of Clojure. It's a fascinating read, thanks for the recommendation! N. On Dec 16, 4:10 pm, Tassilo Horn wrote: > Narvius writes: > > Hi Narvius, > > > So, my question is, why exactly DOESN'T it crash and burn horribly > > with the cries of dying bits in the

Re: lazy-seq and recursion.

2011-12-16 Thread Tassilo Horn
Narvius writes: Hi Narvius, > So, my question is, why exactly DOESN'T it crash and burn horribly > with the cries of dying bits in the background? I suppose it has > something to do with how lazy-seqs work (another mystery for me). A lazy seq is basically a sequence of the first element and a "