mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
* testsuite: Move to... * test-suite/vm: ... here. * Makefile.am (SUBDIRS): Remove `testsuite'. * configure.ac: Output `test-suite/vm/Makefile' instead of `testsuite/Makefile'. * test-suite/Makefile.am (SUBDIRS): Add `vm'.
17 lines
359 B
Scheme
17 lines
359 B
Scheme
;; 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
|
||
|