[gambit-list] Possible bug in define-macro
Frederick LeMaster
fred.lemaster at gmail.com
Sat Apr 9 20:50:04 EDT 2011
Also gambit's version on member only accepts two arguments.
On Sat, Apr 9, 2011 at 1:03 PM, Bradley Lucier <lucier at 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 at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
More information about the Gambit-list
mailing list