Re: Cond, and abusing or

2010-01-16 Thread Meikel Brandmeyer
Hi, Am 16.01.2010 um 01:48 schrieb Scott Burson: > Certainly, this is a very common idiom in Common Lisp and other older > dialects. I guess there are a few people who don't like it, but a lot > of us do it routinely. You'll even see stuff like > > (or (try-to-construct-a-foo) > (error

Re: Cond, and abusing or

2010-01-15 Thread Scott Burson
On Jan 15, 2:02 pm, Simon Brooke wrote: > There's an old programmers hack that works in many languages of > abusing the logical or operator to try a sequence of operations until > one returns something useful. It appears that this works in Clojure, > too. Certainly, this is a very common idiom in

Re: Cond, and abusing or

2010-01-15 Thread Rich Hickey
On Jan 15, 5:02 pm, Simon Brooke wrote: > There's an old programmers hack that works in many languages of > abusing the logical or operator to try a sequence of operations until > one returns something useful. It appears that this works in Clojure, > too. > > The reason I tried it is that I'm un

Cond, and abusing or

2010-01-15 Thread Simon Brooke
There's an old programmers hack that works in many languages of abusing the logical or operator to try a sequence of operations until one returns something useful. It appears that this works in Clojure, too. The reason I tried it is that I'm unhappy with Clojure's implementation of cond. Consider