View difference between Paste ID: vR2PddgN and NUkQMCC1
SHOW: | | - or go back to the newest paste.
1
(defmacro binding-test
2-
  [test body remainder]
2+
  [test body & remainder]
3
  `(let [~'testVar ~test ~'bodyVar ~body] ~@remainder))
4
5
(defmacro do-while
6
  [test & body]
7
  (binding-test test body
8
    (quote
9
      loop [] 
10
      bodyVar
11
      (when testVar
12
        (recur)))))
13
14
(def y 4)
15
(do-while (> y 0)
16
  (println y)
17
  (def y (dec y)))