[plt-scheme] Is there a set data-type?
That said, for searching a fixed set of 10 symbols, I would be surprised if
(define ops '(one two three four five six seven eight nine ten))
...
(memq sym ops)
didn't beat anything more elaborate pretty much every time.
Dave
On Feb 6, 2010, at 10:15 AM, David Herman wrote:
> I think you might want this:
>
> http://planet.plt-scheme.org/display.ss?package=set.plt&owner=dherman
>
> No need for data abstraction, no need to flirt with computability theory or meta-mathematics. It's just a data structure. ;)
>
> Dave
>
> On Feb 5, 2010, at 5:12 PM, Todd O'Bryan wrote:
>
>> I feel like I started a tempest in a teapot.
>>
>> I really just needed to check that an operation passed into a function
>> (as a symbol) was one of the permitted operations. Roughly 10 members,
>> but I didn't want to read through the list of all the operations each
>> time I had to check. Thus, the question about (in my mind, finite)
>> sets and my presumption that a hashtable would be a good
>> representation.
>>
>> Sorry for not asking a more specific question and encouraging all this
>> discussion about much more esoteric topics than I had intended to. :-)
>>
>> Todd
>> _________________________________________________
>> For list-related administrative tasks:
>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme