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

Official Documentation

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

Docstring
==================================================
  Repeatedly executes body while test expression is true. Presumes
  some side-effect will cause test to become false/nil. Returns nil

Source

(defmacro while
  "Repeatedly executes body while test expression is true. Presumes
  some side-effect will cause test to become false/nil. Returns nil"
  {:added "1.0"}
  [test & body]
  `(loop []
     (when ~test
       ~@body
       (recur))))

Example 1

Edit
(def a (atom 10))                                
;; => #'user/a

(while (pos? @a) (do (println @a) (swap! a dec)))
;; > 10
;; > 9
;; > 8
;; > 7
;; > 6
;; > 5
;; > 4
;; > 3
;; > 2
;; > 1
;; => nil

Uses on crossclj