On Jul 3, 11:11 pm, Gert Verhoog <g...@feestpaleis.net> wrote:

> This seems to work:
>
> (def triangle-numbers (lazy-cat [1] (map + (iterate inc 2) triangle-
> numbers)))
>
> cheers,
> gert

Gert,
Your proposed change works very well.

It's interesting that a (seemingly) small change makes a huge
difference in performance and correctness.  I'm new to clojure and
laziness, and will have to  mull this over. Thank you for your help.
It is much appreciated.
David
--~--~---------~--~----~------------~-------~--~----~
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
Note that posts from new members are moderated - please be patient with your 
first post.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to