Associative arrays
I might be asking something stupid but does Gambit come with associative arrays? How do you implement a registry based on a key then? Thanks in advance, Joel -- OpenPoker: The Linux of poker software http://wagerlabs.com/forums
Afficher les réponses par date
Gambit, like most schemes has association lists that you can make use of via the functions assoc, assq, and assv. However you need to realize that this has a worst case performance of O(n). Up to about a hundred elements association lists will probably be out hash tables. Above that though and association list performance drops drastically. If you are going to have a large number of values its probably best to look at the table implementions in slib and the scheme repository. On Tue, 7 Dec 2004 00:10:33 +0000, Joel Reymont <joelr@well.com> wrote:
I might be asking something stupid but does Gambit come with associative arrays?
How do you implement a registry based on a key then?
Thanks in advance, Joel
-- OpenPoker: The Linux of poker software http://wagerlabs.com/forums
_______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca http://mailman.iro.umontreal.ca/mailman/listinfo/gambit-list
-- I'm a programmer, I don't have to spell correctly; I just have to spell consistently
participants (2)
-
Eric Merritt -
Joel Reymont