[plt-scheme] Is there a set data-type?

From: Laurent (laurent.orseau at gmail.com)
Date: Fri Feb 5 11:35:44 EST 2010

2010/2/5 Laurent <laurent.orseau at gmail.com>

> Does something like this sounds interesting and generalizable for infinite
> sets?
> Mixing hashes on finite sets for speed and recurrence for infinite sets in
> the default case (trivial example):
>
> (define h (make-hash))
>
> (for-each (λ(n)(hash-set! h n #t))
>          '(0 2 4 6 8)) ; could be a lot larger of course
>
> (define (odd? n)
>
[...]

This is odd... Is it even possible to make so many mistakes in one day??



>   [...]
> > (even? 9876)
> #t
> > (even? 9877)
> #f
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100205/5cef843b/attachment.html>

Posted on the users mailing list.