Re: Discuss: Add a :let "special expression" to cond

2009-10-18 Thread Howard Lewis Ship
Seem to be hitting a problem. (defmacro cond "Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates and returns the value of the corresponding expr and doesn't evaluate any of the other tests or exprs. As a special case, a te

Re: Discuss: Add a :let "special expression" to cond

2009-10-17 Thread Howard Lewis Ship
Here's my implementation. Seems to be working fine. I like it. http://github.com/hlship/cascade/blob/master/src/main/clojure/cascade/utils.clj http://github.com/hlship/cascade/blob/master/src/test/clojure/cascade/test_utils.clj On Sat, Oct 17, 2009 at 5:06 PM, Howard Lewis Ship wrote: > Coming

Re: Discuss: Add a :let "special expression" to cond

2009-10-17 Thread Howard Lewis Ship
Coming right up! On Sat, Oct 17, 2009 at 9:14 AM, Sean Devlin wrote: > > So you have a working version of this macro, as well as some use cases > in actual code?  This would help the discussion a lot. > > Thanks! > > On Oct 17, 10:43 am, Howard Lewis Ship wrote: >> I keep coming into situations

Re: Discuss: Add a :let "special expression" to cond

2009-10-17 Thread Sean Devlin
So you have a working version of this macro, as well as some use cases in actual code? This would help the discussion a lot. Thanks! On Oct 17, 10:43 am, Howard Lewis Ship wrote: > I keep coming into situations where I'd like a let in the middle of my > cond.  I often do a couple of tests, the

Discuss: Add a :let "special expression" to cond

2009-10-17 Thread Howard Lewis Ship
I keep coming into situations where I'd like a let in the middle of my cond. I often do a couple of tests, then would like to lock down some symbols that I'll use frequently in the remaining cases. There's a precedent for this, in that the for macro allows a :let as an alternative to a list inte