HONS-ACONS!

acons with hons
Major Section:  HONS-AND-MEMOIZATION

Logically, hons-acons! is merely another name for the acons function, i.e., the following is a theorem.

(equal (hons-acons! key value alist) 
       (cons (cons key value) alist))

Practically speaking, HONS-COPY is called on the KEY, VALUE, and ALIST, so that fast access with HONS-GET is a possibility.

Each time that HONS-ACONS is called when alist has an underlying hash table for fast access, that hash table is 'stolen' and associated with the result of the HONS-ACONS.

Has an 'under the hood' implementation. The (HONS KEY VALUE) below will cause VALUE to have a unique representation, which, for large structures, may require a substantial amount of work.