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)))

Data Access Layer design

2010-06-24 Thread michaelr524
Hi, I've started developing a web application using Compojure. I use CouchDB for storing data. Currently I've just created a dal.clj file to contain all the CRUD functions. I might later decide that I want to switch to other Database so I want to make the ground ready for this. So my question is,