<< Back to previous view

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

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: None
Environment:

Linux, openjdk 6



 Description   

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.



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

Generated at Thu Oct 02 07:39:25 CDT 2014 using JIRA 4.4#649-r158309.