Re: bit-and, bit-or arity question

2008-12-22 Thread ntu...@googlemail.com
On Dec 22, 12:39 am, Randall R Schulz wrote: > But I (the individual) agree, modulo a proper overloading pattern to > afford minimal overhead for the two-argument form. You mean like: (defn bit-or ([] 0) ([x] x) ([x y] (clojure.lang.Numbers/or x y)) ([x y & rest] (reduce #(clojure.

Re: bit-and, bit-or arity question

2008-12-21 Thread Randall R Schulz
On Sunday 21 December 2008 15:14, ntu...@googlemail.com wrote: > Why do "bit-or" and "bit-and" only accept 2 arguments? "or" and "and" > accept an arbitrary number and I think it is useful to modifiy "bit- > or" and "bit-and" to accept 2 or more, for example: > > (defn my-bit-or [x y & rest] > (

bit-and, bit-or arity question

2008-12-21 Thread ntu...@googlemail.com
Why do "bit-or" and "bit-and" only accept 2 arguments? "or" and "and" accept an arbitrary number and I think it is useful to modifiy "bit- or" and "bit-and" to accept 2 or more, for example: (defn my-bit-or [x y & rest] (reduce #(clojure.lang.Numbers/or %1 %2) (list* x y rest))) What does the