1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
;; Are macros well-expanded at compilation-time? (defmacro minus-binary (a b) `(- ,a ,b)) (define-macro (plus . args) `(let ((res (+ ,@args))) ;;(format #t "plus -> ~a~%" res) res)) (plus (let* ((x (minus-binary 12 7)) ;; 5 (y (minus-binary x 1))) ;; 4 (plus x y 5)) ;; 14 12 ;; 26 (expt 2 3)) ;; => 34