Re: lazy-cat infinite realization on empty seq

2012-06-03 Thread Stephen Compall
On May 31, 2012, at 9:14 AM, michaelr524 michaelr...@gmail.com wrote: Why the following triggers infinite realization of the infinite lazy seq You've catted together an infinite seq of empty seqs, and forcing a lazy seq doesn't stop until either an element or known emptiness is found, whereas

lazy-cat infinite realization on empty seq

2012-06-02 Thread michaelr524
Hi, This has probably been asked a million times but I couldn't find anything. Why the following triggers infinite realization of the infinite lazy seq and how I can work around it and make it stop when f1 returns an empty seq, (defn f1 [] (println hello) []) (defn f2 [] (lazy-cat (f1) (f2)))