Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Declined
-
Affects Version/s: Release 1.3
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:OSX Lion
Description
contains? returns the wrong result for the last item in a vector:
user> (map #(contains? [1 2 3 4] %) [1 2 3 4])
(true true true false)
This is not a bug. Check the doc – contains? refers to the keys of the collection, not the values. For a vector, the "keys" are the indices.
user=> (map #(contains? [10 20 30 40] %) (range 4))
(true true true true)