Hi Paul,

It's indeed surprising and at first glance, it looks like a bug but
after researching the logs, this let form was introduced in the
following commit
http://github.com/richhickey/clojure/commit/288f34dbba4a9e643dd7a7f77642d0f0088f95ad
with comment "fixed loop with destructuring and inter-binding
dependencies".

Thus this commit allows to write (loop [[x & xs] s y xs] ...) but
introduces this head-retention behaviour.

Right now I can't see how loop can be made to support both cases.
Hopefully someone else will.

Christophe


On Mon, Nov 2, 2009 at 6:49 PM, Paul  Mooser <taron...@gmail.com> wrote:
>
> I'm a little surprised I haven't seen more response on this topic,
> since this class of bug (inadvertently holding onto the head of
> sequences) is pretty nasty to run into, and is sort of awful to debug.
> I'm wondering if there's a different way to write the loop macro so
> that it doesn't expand into an outer "let" form.
>
>
> >
>



-- 
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.cgrand.net/ (en)

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