Association lists

Association lists

Association lists are a simple key/value data structure, consisting of a list of pairs. Keys are looked up in the association list by linearly scanning the list, which makes association lists inefficient for large numbers of entries.
Arc's tables are an alternative to association lists. Some advantages of association lists are that they can preserve order and preserve old values. Also, multiple association lists can share the same tail.

For more information on association lists, see Common Lisp the Language. Unlike Common Lisp association lists that are built out of dotted pairs, Arc association lists are built out of list pairs.

Arc includes functions for looking up keys in an association list, but no explicit support for building association lists. The lists, however, are simple to create and extend: