Hi, Am 16.05.2009 um 21:48 schrieb George Jahad:
I can't come up with a reason to use lazy-cat over concat. Is it just around for backwards compatibility, or am I missing something? (defmacro lazy-cat [& colls] `(concat ~@(map #(list `lazy-seq %) colls)))
There is a difference! Consider the following: (concat (make-foo-seq) (make-bar-seq)) vs. (lazy-cat (make-foo-seq) (make-bar-seq)) In the first case the function are called immediately. In the second case the function call is delayed until they are accessed the first time. Sincerely Meikel
smime.p7s
Description: S/MIME cryptographic signature