As for contains? behavior on lists, it is fixed 
(CLJ-932<https://github.com/clojure/clojure/commit/3acb6ee7ec5c295ae14de861d03a5efd115a5968>)
 
in Clojure 1.5, some 17 days ago:

=> (contains? '(1 2 3) 2); 
IllegalArgumentException contains? not supported on type: 
clojure.lang.PersistentList ...

I wonder if get is also going to be fixed?

=> (get [1 2 3] 2)
3
=> (get '(1 2 3) 2)
nil

On Monday, September 3, 2012 1:03:07 PM UTC+2, Goldritter wrote:
>
> I use Clojure 1.4.0 and wanted to use 'contains?' on a vector and get 
> following results:
>
> => (contains? [1 2 3] 3)
> false
> => (contains? [1 2 3] 2)
> true
>
> As it seems 'contains?' does not check for the last entry in the vector.
>
> And an other question.
> Why does contains? returns everytime 'false' when used on a list?
> => (contains? (list 1 2 3) 1)
> false
> => (contains? (list 1 2 3) 2)
> false
> => (contains? (list 1 2 3) 3)
> false
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to