I think Ambrose is getting at what the original poster is after. I've written this a number of times, but seem to recall doing something like `(def any? (complement not-any?))`, though I'd need to go back and look.
`not-any?` is just `(comp not some)` under the covers, so I guess I'm not sure why `any?` would be out of bounds in core. Cheers, Devin On Sat, Apr 25, 2015 at 8:56 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Do you mean any? as in > > (defn any? [p c] > (boolean (seq (filter? p c)))) > > Thanks, > Ambrose > > On Sat, Apr 25, 2015 at 9:43 PM, Timothy Baldridge <tbaldri...@gmail.com> > wrote: > >> bleh, hit reply too fast. Or also returns the first true value, so (or >> false nil 42) returns 42. >> >> I guess I don't see when I'd use 'any?' >> >> On Sat, Apr 25, 2015 at 7:42 PM, Timothy Baldridge <tbaldri...@gmail.com> >> wrote: >> >>> But it's not really like `or >>> >>> On Sat, Apr 25, 2015 at 7:32 PM, coltnz <colin.tay...@gmail.com> wrote: >>> >>>> Any reason why we don't have `any?`. Googled without much luck. >>>> Trivially done as `comp boolean some` not doubt, but I know I use it >>>> more than not-any at least. >>>> It's particularly useful as a composable `or`. >>>> >>>> >>>> -- >>>> 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 >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Clojure" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to clojure+unsubscr...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> "One of the main causes of the fall of the Roman Empire was that-lacking >>> zero-they had no way to indicate successful termination of their C >>> programs." >>> (Robert Firth) >>> >> >> >> >> -- >> "One of the main causes of the fall of the Roman Empire was that-lacking >> zero-they had no way to indicate successful termination of their C >> programs." >> (Robert Firth) >> >> -- >> 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 >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.