;; The issue with the above example is that `odd-numbers' (and `#3' for that matter) hold a reference to the head of the sequence so the intermediate results can never be reclaimed which is why it runs out of memory eventually. There is no apparent way the `lazy-seq' implementation could guard against this kind of situation. ;; One way to make this example run in constant space is to turn `odd-numbers' into a procedure, like this: #;1> (use lazy-seq) #;2> (define (odd-numbers) (lazy-filter odd? (lazy-numbers))) #;3> (lazy-ref 10000000 (odd-numbers)) 20000001 ;; You will note that this is very slow, though, as it creates a lot of intermediate garbage, putting heavy pressure on the GC.