Free a fast alist after the completion of some form.

Logically, (fast-alist-free-on-exit name form) is the identity and returns form.

Under the hood, this essentially expands to:

 (prog1 form
        (fast-alist-free name))

In other words, name is not freed immediately, but instead remains a fast alist until the form completes. This may be useful when you are writing code that uses a fast alist but has many return points.

See also the macro fast-alists-free-on-exit defined in the community book "books/centaur/misc/hons-extra.lisp", which can be used to free several alists.

The community book "books/centaur/misc/hons-extra.lisp" extends the b* macro (defined in the community book "books/tools/bstar.lisp") with the free-on-exit pattern binder. That is, after executing (include-book "centaur/misc/hons-extra.lisp" :dir :system), the form

 (b* (...
      ((free-on-exit a b c))

causes a, b, and c to be freed when the b* completes, but they remain fast alists until then.