Are incremental Macro definition possible?
        Posted  
        
            by Davorak
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Davorak
        
        
        
        Published on 2010-05-01T04:54:42Z
        Indexed on 
            2010/05/01
            5:17 UTC
        
        
        Read the original article
        Hit count: 267
        
I often find the following type of incremental definition useful:
(define (foo) (display "bar"))
(foo)
;prints bar
(define foo (let ((bar foo))
              (lambda ()
                (display "foo")
                (bar))))
(foo)
;prints foobar
How do I preform this type of incremental definition with macros? I could not get let-syntax to provide the same functionality.
Currently I use plt scheme, but would like to see answers in different lisp implementations as well.
© Stack Overflow or respective owner