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

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Fri Feb 5 11:16:32 EST 2010

David Van Horn wrote:
> 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

I agree but my case is constrained to sets of Integers. What I will have 
to work out is a way to implement all the set operations on possibly 
infinite sets of integers. Fortunately I don't have to touch the case of 
general sets! :)


Posted on the users mailing list.