Talking about equality of:
user=> (= [1, 2] '(1, 2))
true
I also wondered if there could be something as "strict equal", which
returns true only if both the operands are equal and of the same type.
See JavaScript:
http://www.devguru.com/Technologies/ecmascript/quickref/comparison_operators.html
h
On Wed, Jan 28, 2009 at 11:13 AM, Frantisek Sodomka wrote:
[...]
Since this is correct:
> user=> (= () [])
> true
>
> Shouldn't these be also 'true'?
> user=> (= {} [])
> false
> user=> (= {} #{})
> false
> user=> (= {} ())
> false
> user=> (= #{} [])
> false
> user=> (= #{} ())
> false
>
Well,
> I'd also like function? and macro? as an alternative to checking the
> metadata for :macro set to true.
Forgive my parital answer to the intial query of the thread, but
regarding a function? predicate, it's already included:
user=> (doc fn?)
-
clojure.core/fn?
([x])
R
On Wed, Jan 28, 2009 at 11:13 AM, Frantisek Sodomka wrote:
>
> Hello all!
> During writing tests for type predicates, I noticed that these -
> possibly useful - predicates are not in clojure.core:
> boolean?
> character?
> regex?
> array?
I'd also like function? and macro? as an alternative to c
Hello all!
During writing tests for type predicates, I noticed that these -
possibly useful - predicates are not in clojure.core:
boolean?
character?
regex?
array?
Since this is correct:
user=> (= () [])
true
Shouldn't these be also 'true'?
user=> (= {} [])
false
user=> (= {} #{})
false
user=> (