Re: New functions and possible bugs

2009-01-28 Thread Frantisek Sodomka
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

Re: New functions and possible bugs

2009-01-28 Thread Cosmin Stejerean
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,

Re: New functions and possible bugs

2009-01-28 Thread Perry Trolard
> 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

Re: New functions and possible bugs

2009-01-28 Thread Mark Volkmann
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

New functions and possible bugs

2009-01-28 Thread Frantisek Sodomka
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=> (