Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmacro binding-test
- [test body & remainder]
- `(let [~'testVar ~test ~'bodyVar ~body] ~@remainder))
- (defmacro do-while
- [test & body]
- (binding-test test body
- (quote
- loop []
- bodyVar
- (when testVar
- (recur)))))
- (def y 4)
- (do-while (> y 0)
- (println y)
- (def y (dec y)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement