[racket-dev] Optional equality predicate for assoc and member

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Apr 22 19:43:00 EDT 2011

An hour ago, Neil Van Dyke wrote:
> Eli Barzilay wrote at 04/22/2011 05:09 PM:
> > One way to make it fast is to have it bound to a macro so (member
> > f l eq?) expands to a `memq', and when used as a function have it
> > dispatch to `memq' if given `eq?'.
> If someone really wanted to do that optimization in a macro (at
> first glance, seems a little unSchemely to me, [...]

You're missing the rest of it, where I said that using it as an
expression expands to a function value as you'd expect.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.