Hello,
I am trying to work through the little schemer book. In order to make it
easier to go through the examples, I've come up with the following macro:
;;; Helper to visualize
(define-macro (disp exp)
(display exp) (newline)
`(display ,exp)
; (newline) (newline)
)
This works great, except that when I uncomment the (newline) expressions,
the result of the evaluation is omitted:
guile> (define-macro (disp exp)
... (display exp) (newline)
... `(display ,exp)
... ; (newline) (newline)
... )
guile> (disp (+ 3 4)) (newline)
(+ 3 4)
7
guile> (define-macro (disp exp)
... (display exp) (newline)
... `(display ,exp)
... (newline) (newline)
... )
guile> (disp (+ 3 4)) (newline)
(+ 3 4)
guile>
Any hints?