store/[org.clojure/clojure "1.8.0"] clj::clojure.core/binding

Official Documentation

Add notes
Arities
==================================================
   [bindings & body]

Docstring
==================================================
  binding => var-symbol init-expr

  Creates new bindings for the (already-existing) vars, with the
  supplied initial values, executes the exprs in an implicit do, then
  re-establishes the bindings that existed before.  The new bindings
  are made in parallel (unlike let); all init-exprs are evaluated
  before the vars are bound to their new values.

Source

(defmacro binding
  "binding => var-symbol init-expr

  Creates new bindings for the (already-existing) vars, with the
  supplied initial values, executes the exprs in an implicit do, then
  re-establishes the bindings that existed before.  The new bindings
  are made in parallel (unlike let); all init-exprs are evaluated
  before the vars are bound to their new values."
  {:added "1.0"}
  [bindings & body]
  (assert-args
    (vector? bindings) "a vector for its binding"
    (even? (count bindings)) "an even number of forms in binding vector")
  (let [var-ize (fn [var-vals]
                  (loop [ret [] vvs (seq var-vals)]
                    (if vvs
                      (recur  (conj (conj ret `(var ~(first vvs))) (second vvs))
                             (next (next vvs)))
                      (seq ret))))]
    `(let []
       (push-thread-bindings (hash-map ~@(var-ize bindings)))
       (try
         ~@body
         (finally
           (pop-thread-bindings))))))

Example 1

Edit
;; As of Clojure 1.3, vars need to be explicitly marked as ^:dynamic in order for
;; them to be dynamically rebindable:

(def ^:dynamic x 1)
;; => #'user/x

(def ^:dynamic y 1)
;; => #'user/y

(+ x y)
;; => 2

;; Within the scope of the binding, x = 2 and y = 3

(binding [x 2 y 3]
  (+ x y))
;; => 5

;; But once you leave the binding's scope, x and y maintain their original
;; bindings:

(+ x y)
;; => 2

Example 2

Edit
;;Use t like a "template"

(declare ^:dynamic t)

(defn addt [] 
  (+ t 10))

(binding [t 1]
  (addt))
=> 11

Uses on crossclj