<< Back to previous view

[CLJ-810] clojure.set/difference Created: 15/Jun/11  Updated: 23/Feb/15  Resolved: 23/Feb/15

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.2
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Joel Kaasinen Assignee: Unassigned
Resolution: Declined Votes: 1
Labels: checkargs

Linux, openjdk 6


This seems a bit weird. Maybe set difference could check that the collections are sets?

(clojure.set/difference (set [0 300 :a]) [:a :b])
#{0 300}
(clojure.set/difference (set [0 300 :a]) [:a :b :c :d])
#{:a 300}
(clojure.set/difference (set [0 300 :a]) (set [:a :b :c :d]))
#{0 300}

The problem is still present in the master branch too.

Comment by Stuart Halloway [ 20/Jun/11 7:04 AM ]

set/difference's behavior is not documented if you don't pass in a set.

Comment by Andy Fingerhut [ 23/Feb/15 9:23 PM ]

Temporarily reopening only to add a label, and then will return to its original state.

Generated at Wed Jan 17 01:45:49 CST 2018 using JIRA 4.4#649-r158309.