1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ;; simple common lisp program ;; demo work macro ;; writeln macro provide print function ;; as some in turbo pascal (defmacro writeln (&rest args) `(progn (loop for e in (list ,@args) do (format t "~A" e)) (format t "~%"))) (defvar name "Alice") (macroexpand '(writeln "hello, " name "!")) (defun hello (name) writeln "hello, " name "!") |
t.me/perfect0sight

Комментарии
Отправить комментарий