Common Lisp Package: BACKPORTS.HAMT

README:

FUNCTION

Public

HAMT-GET (HAMT KEY)

Lookup a value in a hash table. Returns success in a second value.

HAMT-INSERT (HAMT KEY VALUE)

Add a value to a persistent hash table, returning a new table with shared structure.

HAMT-KEYS (HAMT)

Return a list of all the keys of HAMT.

HAMT-REMOVE (HAMT KEY)

Remove a value, returning an new instance of the hash table with shared structure.

MAKE-HAMT (&OPTIONAL (TEST 'EQL))

Return a new persistent hash table.

MACRO

Private

Undocumented

WITH-TABLE-NODE ((&KEY (BITMAP (GENSYM BITMAP)) (BIT (GENSYM BIT)) (INDEX (GENSYM INDEX)) (HIT (GENSYM HIT))) (NODE HASH DEPTH) &BODY BODY)

GENERIC-FUNCTION

Private

Undocumented

%GET (NODE TEST KEY HASH DEPTH)

%INSERT (NODE TEST KEY HASH VALUE DEPTH)

%KEYS (NODE)

%REMOVE (NODE TEST KEY HASH DEPTH)

SLOT-ACCESSOR

Private

Undocumented

HAMT-TABLE (OBJECT)

HAMT-TEST (OBJECT)

NODE-KEY (OBJECT)

NODE-VALUE (OBJECT)

VARIABLE

Private

*HAMT-PERSISTENT*

Use persistent (functional) data structures by default, but allow transients as an optimization.

CLASS

Private

Undocumented

CONFLICT-NODE

HAMT

TABLE-NODE

VALUE-NODE