Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Okay, I did actually get the Scheme macro slightly wrong. That's why I usually try to test this stuff in advance...

  (define-syntax debug
    (ir-macro-transformer
      (lambda (e i c)
        (let ((stmts (cdr e)))
          (cons 'begin (map (lambda (stmt)
                        `(begin (write ,stmt)
                                (display ": ")
                                (newline)) 
                        stmts)))))


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: