On Mon, Dec 8, 2008 at 7:15 PM, Chouser <[EMAIL PROTECTED]> wrote:
> On Mon, Dec 8, 2008 at 10:42 AM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>>
>> On Dec 8, 10:08 am, Chouser <[EMAIL PROTECTED]> wrote:
>>>
>>> doseq currently supports both.  If both appear on the same binding,
>>> the :while is always test first regardless of the order in which they
>>> appear in the doseq.  The thinking is that if the :while is false,
>>> there's no need to check the :when.
>>>
>>> Is this Good, and should 'for' work the same way?
>>>
>>
>> Yes.
>
> The attached patch adds support for :when and :while on the binding
> expression in 'for'.  The macro now parses its arguments using code
> almost identical to 'doseq'.  I've changed some local names in 'for'
> and 'doseq' where they are similar to each other, so that both have
> what I believe to be more descriptive names.
>
> If these extra renaming changes are undesirable, I can certainly
> create a smaller patch.
>
> I've also attached a set of tests that I used.  All but
> While-and-When-Same-Binding behaved identically before and after my
> changes to 'for'.
>

Patch applied (svn 1148) - thanks!

Rich

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to