Function: ht->alist

ht->alist is a byte-compiled function defined in ht.el.

Signature

(ht->alist TABLE)

Documentation

Return a list of two-element lists '(key . value) from TABLE.

Note that hash tables are unordered, so this cannot be an exact inverse of ht<-alist. The following is not guaranteed:

(let ((data '((a . b) (c . d))))
  (equalp data
          (ht->alist (ht<-alist data))))

Aliases

ht-to-alist

Source Code

;; Defined in ~/.emacs.d/elpa/ht-20230703.558/ht.el
(defun ht->alist (table)
  "Return a list of two-element lists \\='(key . value) from TABLE.

Note that hash tables are unordered, so this cannot be an exact
inverse of `ht<-alist'.  The following is not guaranteed:

\(let ((data \\='((a . b) (c . d))))
  (equalp data
          (ht->alist (ht<-alist data))))"
  (declare (side-effect-free t))
  (ht-amap (cons key value) table))