[plt-scheme] Is there a set data-type?
On 2/5/10 11:03 AM, Paulo J. Matos wrote:
> Thanks for the thoughts on performance.
> Another thing I will have to think about is computing the cardinality of
> the set which might return +inf.0 of course. I am not even sure this
> representation allows the computation of cardinality in a finite amount
> of time.
When you're in the world of infinite sets there are all kinds of
questions that are not decidable, that just comes with the territory.
It's fun, for example, to construct the representation of Russell's
paradoxical set: the set of all sets that don't contain themself.
(define R (lambda (x) (not (x x))))
Now is R a member of the set R? Well just run it and find out: (R R).
David