Clojure

clojure.set/difference

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: Release 1.2
  • Fix Version/s: None
  • Component/s: None
  • 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.

Activity

Hide
Stuart Halloway added a comment -

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

Show
Stuart Halloway added a comment - set/difference's behavior is not documented if you don't pass in a set.
Stuart Halloway made changes -
Field Original Value New Value
Status Open [ 1 ] Closed [ 6 ]
Resolution Declined [ 2 ]

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: