Arc Forumnew | comments | leaders | submitlogin
2 points by xrchz 5929 days ago | link | parent

I'm really sorry my parentheses were mismatching. Here is a correct example.

  (define pusher cons)
  (define-syntax push
    (syntax-rules ()
      ((_ e ls) (pusher e ls))))
  (let ((pusher (lambda (x ls) (append ls (list x)))))
    (display (push 'a '(b c d))) (newline)
    (display (pusher 'd '(a b c))) (newline))