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

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Apr 24 20:57:59 EDT 2011

On Sun, Apr 24, 2011 at 7:53 PM, Eli Barzilay <eli at barzilay.org> wrote:
> Here's another idea: in a world of immutable lists there are *much*
> less circular lists.  (Even more: the fact that they're generated via
> a temporary structure that is then copied means that they're usually
> very short too.)  Maybe it's fine to take it to the next level and
> just have all the standard functions ignore cycles?  Possibly with
> alternative names (or a new module) for versions that do account for
> cycles -- therefore putting the burden on the rare uses of circular
> lists?

How about, instead of that: keep a counter and when you've seen 1000
(or 10000) cons cells or some other large number, then switch into a
safe mode?


Posted on the dev mailing list.