зеркало из https://github.com/mozilla/pjs.git
Added hash-table-entries
This commit is contained in:
Родитель
957dbfeb73
Коммит
d9fd9938e0
|
@ -327,6 +327,15 @@
|
|||
(write-to-string item)))))))
|
||||
|
||||
|
||||
; Return an association list of all the entries in the hash table.
|
||||
(defun hash-table-entries (hash-table)
|
||||
(let ((entries nil))
|
||||
(maphash #'(lambda (key value)
|
||||
(push (cons key value) entries))
|
||||
hash-table)
|
||||
entries))
|
||||
|
||||
|
||||
; Given an association list ((key1 . data1) (key2 . data2) ... (keyn datan)),
|
||||
; produce another association list whose keys are sets of the keys of the original list,
|
||||
; where the data elements of each such set are equal according to the given test function.
|
||||
|
|
|
@ -327,6 +327,15 @@
|
|||
(write-to-string item)))))))
|
||||
|
||||
|
||||
; Return an association list of all the entries in the hash table.
|
||||
(defun hash-table-entries (hash-table)
|
||||
(let ((entries nil))
|
||||
(maphash #'(lambda (key value)
|
||||
(push (cons key value) entries))
|
||||
hash-table)
|
||||
entries))
|
||||
|
||||
|
||||
; Given an association list ((key1 . data1) (key2 . data2) ... (keyn datan)),
|
||||
; produce another association list whose keys are sets of the keys of the original list,
|
||||
; where the data elements of each such set are equal according to the given test function.
|
||||
|
|
Загрузка…
Ссылка в новой задаче