function | since v0.0-927 | clojure.core/complement | Edit |

`(complement f)`

Takes a function `f`

and returns a function that takes the same arguments as
`f`

, has the same effects, if any, and returns the opposite truth value.

```
(def a 10)
((complement #(= a %)) 12)
;;=> true
```

Source docstring:

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.

Source code @ clojurescript:src/main/cljs/cljs/core.cljs

```
(defn complement
[f]
(fn
([] (not (f)))
([x] (not (f x)))
([x y] (not (f x y)))
([x y & zs] (not (apply f x y zs)))))
```