Re: Why can't :let be first in a for

2009-10-26 Thread Christopher Taylor
Dear all, I've got a re-implementation of the for-macro sitting around here that removes this limitation (and others, the vector can't be empty either, if I remember correctly). The implementation also adds the sorting and grouping functionality described in Wadler and Jones' paper "comprehensive

Re: Why can't :let be first in a for

2009-10-24 Thread Howard Lewis Ship
>From my perspective, having the forms be flatter (less nested) and having the call to the extend-dom function be at the outermost level is the most readable. On Fri, Oct 23, 2009 at 1:20 PM, Meikel Brandmeyer wrote: > Hi, > > Am 23.10.2009 um 21:16 schrieb Howard Lewis Ship: > >> Here's what I

Re: Why can't :let be first in a for

2009-10-23 Thread Meikel Brandmeyer
Hi, Am 23.10.2009 um 21:16 schrieb Howard Lewis Ship: > Here's what I wanted to write: > > (defn add-script-links-for-imported-javascript-libraries > [env dom-nodes] > (extend-dom dom-nodes [:html :head] :top > (template-for [:let [aggregation (-> env :cascade :resource-

Re: Why can't :let be first in a for

2009-10-23 Thread Chouser
On Fri, Oct 23, 2009 at 3:16 PM, Howard Lewis Ship wrote: > > I like to try and keep my level of nesting under control, and this > often involves hiding or re-structuring the let macro. The for macro > can implicitly assemble a let macro for you, but with a limitation > that the :let clause can't

Why can't :let be first in a for

2009-10-23 Thread Howard Lewis Ship
I like to try and keep my level of nesting under control, and this often involves hiding or re-structuring the let macro. The for macro can implicitly assemble a let macro for you, but with a limitation that the :let clause can't be first: 1:5 user=> (for [:let [z [:foo :bar]] x z] (name x)) java