2 Mar 92 21:10:21 GMT
From: firstname.lastname@example.org (Joern Rennecke)
Subject: general documentation on alists
Alists provide a fast and convenient way to access data
Alists are implemented as arrays of arrays, the first being
the array holding the keys, the others arrays holding
associated data. An empty alist is an array of empty arrays.
Note that the the dimensions of the arrays are used the other
way than in lisp to allow for faster searching.
Keys have to be of type integer, string or object. Types can
The search functions return an undefined value when another
list is given in place of a presorted key list.
A list with non-numeric keys retrieved by restore_object() has
to be readjusted by using order_alist(), especially after
Deleting an entry can safely be done with exclude_array as
long as all associated data lists are treated like the key
array; index finding for such purposes can be done with assoc.
Typical applications: holding administrary information about
wizards, list of visitors in a pub, list of customers having
some sort of credit, information remembered about items etc.
The main use of alists, storing data associatively, is now
better performed by mappings. Alists are needed for more
extreme situations only.
A maximum array size of 1000 might prove to be to small.
mappings(LPC), order_alist(E), insert_alist(E), assoc(E),