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
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
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
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