[plt-scheme] Is there a set data-type?
David Van Horn wrote:
>
> Uh, how do you represent the set of all even numbers, for example?
>
> This is an exercise we give our first semester undergraduates here at
> Northeastern. I'll give you a hint: you don't need lists or hash
> tables, go back to the mathematical foundations and think characteristic
> functions.
>
> Now you do union, intersection, setminus, etc.
>
Good example... in fact, I didn't even thought about it when I
implemented this... ahah Funny. Thanks for the counterexample.
I guess the characteristic function approach involves using lambdas to
represent a set... :-/ I am worried with efficiency but I will give it a
try.
> David
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme