On Sun, Jan 1, 2012 at 11:09 PM, Cedric Greevey <cgree...@gmail.com> wrote: > On Sun, Jan 1, 2012 at 10:31 PM, Stephen Compall > <stephen.comp...@gmail.com> wrote: >> On Sun, 2012-01-01 at 22:10 -0500, Cedric Greevey wrote: >>> Odd that this isn't named not-empty? with a ? character. >> >> Not at all; it's not a predicate. See also `every?' versus `some'. > > It's useful as an if or cond clause; that to me says "predicate". > "Some" is a more borderline case, since its name refers to the element > it returns if one fits, rather than to a yes-or-no property like > "empty" or "not empty". A question-name for using the behavior of the > some function as a predicate would probably be better off as "any?" > rather than "some?".
Just to add to this, it's also the case that you're likely to be using the return value of some, beyond conditioning on its truthiness; you usually use "some" because you want the element itself right away, and only occasionally because (for now) you just want to see if the collection has a suitable element. On the other hand, the return value of not-empty is generally an object you already had in hand. Other than as a shorthand for (if (not-empty x) x) the return value is unlikely to be used very often for more than its truthiness. > And that will obviously be chock-full of internals changes and > miscellaneous tweaks and not just the user-visible feature > changes/additions, aimed more at developers of Clojure itself than at > developers using Clojure to make other things. And likely organized in some less-than-desirable manner, such as chronologically or even more or less randomly (e.g. alphabetically by the name of an affected component or function), rather than grouped by related changes/feature set (numerics changes in one spot; record changes in one spot; new seq API functions, if any, in one spot; new map API functions, if any, in one spot; etc.). -- 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