;; Below is how to do macros in the repl in Aubrey Jaffer's SCM.
;; Note we invoke a new repl, and tell the new repl to evaluate macros.
;; Also note that the name of the quit command in the new repl is different
;; from the usual quit command.
;; Friday  2 March 2012 01:23:19 -0500

> (require 'repl)
#<unspecified>
> (require 'repl)
#t
> (require 'syntax-case)
#<unspecified>
> (repl:top-level macro:eval)
> (define-syntax when
  (syntax-rules ()
    ((_ pred b1 ...)
     (if pred (begin b1 ...)))))
#<unspecified>
> (define-syntax while
  (syntax-rules ()
    ((_ pred b1 ...)
     (let loop () (when pred b1 ... (loop))))))
#<unspecified>
> (define box (make-vector 1))

(define i 0)

(while (< i 10)
    (display i)
    (newline)
    (set! i (+ 1 i))
    (vector-set! box 0 i))
#<unspecified>
> #<unspecified>
> 0
1
2
3
4
5
6
7
8
9
#<unspecified>
> i
10
> box
#(10)
> (repl:quit)
#<unspecified>
> (quit)

Process scheme finished
