Clojure Programming/Examples/API Examples/Function Tools

#
See the reader page, (Macro characters -> Dispatch -> Anonymous function literal) for an explanation of the '%' and other characters used to refer to function arguments.

"lambda"
Use fn, or even better there is a custom syntax to create an anonymous function:

%
Represents an optional argument to an unnamed function:

Arguments in the body are determined by the presence of argument literals taking the form %, %n or %&. % is a synonym for %1, %n designates the nth arg (1-based), and %& designates a rest arg.

complement
Usage: (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.