On Thu, 30 Apr 2009 23:20:14 +0530, samppi <rbysam...@gmail.com> 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?

user=> (doc complement)
-------------------------
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=>

Regards,
Parth


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to