Add while-let.

Signed-off-by: Richard Newman <rnewman@twinql.com>
This commit is contained in:
Richard Newman 2016-07-14 17:13:16 -07:00
parent bf080ced3c
commit 6c367616e6

View file

@ -29,3 +29,9 @@
(if ks
(assoc m k (conj-in (get m k) ks v))
(assoc m k (conj (get m k) v))))
(defmacro while-let [binding & forms]
`(loop []
(when-let ~binding
~@forms
(recur))))