Wonderful. I didn't think of searching for "opposite". Thanks everyone.
On Apr 30, 11:25 am, "Stephen C. Gilardi" <squee...@mac.com> wrote: > On Apr 30, 2009, at 1:50 PM, samppi wrote: > > > I know there's a core function that takes a predicate and returns its > > opposite: > > > (defn mystery [predicate] > > (fn [x] (not (predicate x)))) > > > I'm having a lot of trouble finding the name of it in the docs, > > though. Could anyone give me its name? Or does this function not exist > > in the core? > > Is this the one you're thinking of? > > user=> (find-doc "opposite") > ------------------------- > clojure.core/complement > ([f]) > Takes a fn f and returns a fn that takes the same arguments as f, > has the same effects, if any, and returns the opposite truth value. > nil > user=> > > --Steve > > smime.p7s > 3KViewDownload --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---