Welcome to the CHICKEN Scheme pasting service

"Just expand to a call" they say added by anonymous on Fri Nov 27 23:44:24 2015

(define-syntax my-append
  (ir-macro-transformer
    (lambda (e i c)
      (string-append
        "["
        (string-concatenate
          (map
            (lambda (sym)
              (string-append
                (symbol->string (strip-syntax sym))
                ", "))
            (if (null? e)
              '() (cdr (butlast e)))))
        (symbol->string (strip-syntax (last e)))
        "]"))))

(define-syntax call
  (syntax-rules ()
    ((_ name ...)
     ((my-append name ...)
      name ...))))

,x (call a b c d)
; Expands to ((my-append a b c d) a b c d)
; instead of ("[ a, b, c, d ]" a b c d)

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Name of the CHICKEN extension manager:
Visually impaired? Let me spell it for you (wav file) download WAV