Re: Two convenience methods

2010-07-22 Thread Travis Hoffman
Frederick, I agree with all you said; perhaps this is as much my personal coding style. Also, I'm seeing Clojure through beginner's eyes. What I love about Clojure is the readability and the "naturalness" of the names of functions. While skimming the API, I was looking for the natural opposite of

Re: Two convenience methods

2010-07-22 Thread Travis Hoffman
*sigh* ... it was a typo. Good catch! On Jul 21, 10:16 pm, B Smith-Mannschott wrote: > On Wed, Jul 21, 2010 at 23:45, Travis Hoffman > wrote: > > ... > > > > > > > The second function is suggested as an addition to clojure.set. The > > "disjoint?" function decides if two sets have no elements in

Re: Two convenience methods

2010-07-21 Thread B Smith-Mannschott
On Wed, Jul 21, 2010 at 23:45, Travis Hoffman wrote: ... > The second function is suggested as an addition to clojure.set. The > "disjoint?" function decides if two sets have no elements in common. > This can easily be done using: > >  (not (nil? (intersection s1 s2))) > > but this implementation

Re: Two convenience methods

2010-07-21 Thread Frederick Polgardy
Ok you said this too. :) But the non-booleanness of (some ...) isn't that important. The result of (some ...) is truthy, and can be used in any boolean context. -Fred -- Science answers questions; philosophy questions answers. On Jul 21, 2010, at 8:07 PM, Frederick Polgardy wrote: > http://ri

Re: Two convenience methods

2010-07-21 Thread Frederick Polgardy
Oops, you already said that, my bad. :) -- Science answers questions; philosophy questions answers. On Jul 21, 2010, at 8:13 PM, Frederick Polgardy wrote: > Or [using clojure.set] (empty? (intersection s1 s2)). > > -- > Science answers questions; philosophy questions answers. > > On Jul 21, 20

Re: Two convenience methods

2010-07-21 Thread Frederick Polgardy
Or [using clojure.set] (empty? (intersection s1 s2)). -- Science answers questions; philosophy questions answers. On Jul 21, 2010, at 4:45 PM, Travis Hoffman wrote: > The second function is suggested as an addition to clojure.set. The > "disjoint?" function decides if two sets have no elements i

Re: Two convenience methods

2010-07-21 Thread Frederick Polgardy
http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/some -- Science answers questions; philosophy questions answers. On Jul 21, 2010, at 4:45 PM, Travis Hoffman wrote: > (defn any? > "Returns true if (pred x) is logically true for one x in coll, else > false." > {:added "1.