Chris Chapline
What is it?
7. Files and strings
8. Quoting
9. Macros
10. try and catch
11. Self hosting
1. Bash Shell
2. C
3. C#
4. Clojure
5. CoffeeScript
6. Forth
7. Go
8. Haskell
9. Java
10. JavaScript
Implementation Examples
11. Lua
12. GNU Make
13. mal
14. MATLAB
15. miniMAL
16. Nim
17. OCaml
18. Perl
19. PHP
20. Postscript
21. Python
22. R
23. Racket
24. Ruby
25. Rust
26. Scala
27. Swift
28. Visual Basic.NET
A defn macro:
(defmacro! defn
(fn* [name args impl]
`(def! ~name (fn* (~@args) ~impl))))
(defn identity [a] a)
(macroexpand (defn identity [a] a)); (def! identity [a] a)
New flow of control structures:
(defmacro! unless
(fn* [test body]
`(if ~test nil ~body)))
(defmacro! while
(fn* [test body]
`(if ~test (do ~body (while ~test ~body)))))