Clearly you are all dog people. Lazy cat is redundant.
On May 16, 3:55 pm, Meikel Brandmeyer <m...@kotka.de> wrote:
> 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
> 5KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---