Re: Bug with clojure.set/intersection, clojure.set/difference etc.

2009-01-29 Thread ntu...@googlemail.com
On Jan 29, 7:10 pm, Jason Wolfe wrote: > I think this is not a bug in disj.  disj takes a *set* and an element > as input.  nil is the empty seq, which is different from the empty set > #{}. Well, then forget my remark about disj and let's concentrate on the set functions. Those operate on sets

Re: Bug with clojure.set/intersection, clojure.set/difference etc.

2009-01-29 Thread Meikel Brandmeyer
Hi, Am 29.01.2009 um 15:42 schrieb ntu...@googlemail.com: If its left argument is nil, "intersection" throws a NPE (Clojure rev. 1235): The same is true for clojure.set/difference and everything else that uses clojure.disj with nil for the first parameter. IMHO, this is not a bug. nil is no

Re: Bug with clojure.set/intersection, clojure.set/difference etc.

2009-01-29 Thread Jason Wolfe
I think this is not a bug in disj. disj takes a *set* and an element as input. nil is the empty seq, which is different from the empty set #{}. The fact that clojure.set functions work at all on things other than bona fide sets is, in Rich's words, "an implementation artifact and not a promise

Bug with clojure.set/intersection, clojure.set/difference etc.

2009-01-29 Thread ntupel
If its left argument is nil, "intersection" throws a NPE (Clojure rev. 1235): user=> (set/intersection nil #{1}) java.lang.NullPointerException (NO_SOURCE_FILE:0) user=> (.printStackTrace *e) java.lang.NullPointerException (NO_SOURCE_FILE:0) at clojure.lang.Compiler.eval(Compiler.java:418