Also gambit's version on member only accepts two arguments.
On Sat, Apr 9, 2011 at 1:03 PM, Bradley Lucier lucier@math.purdue.edu wrote:
You need to quote the "equal", otherwise you're trying to insert a procedure into the code, not a symbol:
(define-macro (pushnew item lst . test) (let ((== (gensym))) `(let ((,== ,(if (null? test) 'equal? (car test)))) (if (not (member ,item ,lst ,==)) (set! ,lst (cons ,item ,lst))))))
Brad
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list