Mercurial > repos > other > SevenLanguagesInSevenWeeks
diff 6-Clojure/macro.clj @ 83:eccc649d49a2
Add Day 2 and Day 3 notes and example code
Clojure STILL doesn't make much sense in lots of places
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 08 Jun 2019 21:23:27 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/6-Clojure/macro.clj Sat Jun 08 21:23:27 2019 +0100 @@ -0,0 +1,7 @@ +(defmacro unless [test body] + (list 'if (list 'not test) body)) + +(macroexpand '(unless condition body)) + +(unless true (println "Should not print")) +(unless false (println "Should print")) \ No newline at end of file