actually i think what i said wasnt accurate, its not checking identity
because you can do this :
=> (def x [1 2])
=> (def z (hash-set [1 2]))
=> (contains? z x)
true
=> (contains? z [1 2])
true
=> (== x [1 2])
false
That means the check for contains isnt identity, but rather the same
type
On Sat, 3 Jan 2009 01:32:08 -0800 (PST)
Jason wrote:
>
> Is this desired behavior for contains?
>
> 1:1 user=> (= [1 2] '(1 2))
> true
> 1:2 user=> (contains? (hash-set [1 2]) '(1 2))
> false
> 1:3 user=> (contains? (sorted-set [1 2]) '(1 2))
> java.lang.ClassCastException: clojure.lang.Persis
On Wed, 14 Jan 2009 02:47:23 -0800 (PST)
HB wrote:
>
> I didn't get you, would you please hold my hand and walking me as you
> explain line by line what is happening in my code?
the simple way to work it out is to count up from where you are running
the code, so if you use *2, count up to see
On Wed, 14 Jan 2009 04:15:18 -0800 (PST)
HB wrote:
>
> Lets say that the result of each method invocation will be saved in a
> stack.
> The stack now contains, Google and Wicket
> When I run (str *1) , I will get the last item in the stack which it
> is "Wicket" and the result of the method inv