Common Lisp Package: PERSISTENT-TABLES

README:

FUNCTION

Public

FRESH-PTBL (&OPTIONAL (N 107) (TEST #'EQUAL))

Create a fresh persistent hash table with N (107) bins and TEST for equality.

PTBL->ALIST (TBL)

Return an association list with the same assocations as TBL.

PTBL->PPSTRING (TBL)

Produce a nice string representation of the persistent hash table TBL.

PTBL-GET (TBL KEY &OPTIONAL OR-VALUE)

Retreive the association for KEY from the persistent hashtable TBL. Return OR-VALUE if no association exists, which defaults to NIL.

PTBL-KEYS (TBL)

Return a list of all keys in the persistent hash table TBL. Order is unspecified.

PTBL-SET (TBL KEY VAL)

Return a new persistent hash table which is like TBL except that KEY is associated with VAL.

PTBL-VALUES (TBL)

Return a list of all values in the persistent hash table TBL. Order is unspecified.

{} (MAYBE-PTBL &REST ARGS)

Construct or augment a PTBL with the KEY/VAL pairs in ARGS. If MAYBE-PTBL is not a PTBL, treat it as the first key and use an empty persistent table.

Private

BUCKET-KEYS (BUCKET)

Return all the keys in a BUCKET.

BUCKET-VALUES (BUCKET)

Return all the values in a BUCKET.

PTBL-ADD-TO-BUCKET (BUCKET KEY VAL TEST &OPTIONAL ACC)

Add an association to BUCKET with KEY, VAL and KEY equality tested under TEST.

PTBL-BUCKETS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

PTBL-DIP-BUCKETS (P F)

Set the BUCKETS part of a persistent table P to (FUNCALL F B), where B is the old buckets.

PTBL-GET-FROM-BUCKET (BUCKET KEY TEST)

Find an association to BUCKET with KEY. TEST defines key equality.

PTBL-N-BUCKETS (P)

Return the number of buckets in the table P.

PTBL-SET-BUCKETS (P B)

Set the BUCKETS part of a persistent table P to B.

PTBL-TEST (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

COPY-PTBL (INSTANCE)

EMPTY? (X)

MAKE-PTBL (&KEY ((BUCKETS DUM35) NIL) ((TEST DUM36) NIL))

SETFPTBL-BUCKETS (NEW-VALUE INSTANCE)

PTBL-P (OBJECT)

SETFPTBL-TEST (NEW-VALUE INSTANCE)

PTBL? (OBJECT)

MACRO

Private

Undocumented

NAMED-LET (NAME BINDINGS &BODY BODY)

VARIABLE

Private

THE-EMPTY-PTBL

An empty EQUAL testing persistent hash table.

THE-EMPTY-PTBL-EQ

An empty EQ testing persistent hash table.

CLASS

Private

Undocumented

PTBL