Function: parseclj-hash-table
parseclj-hash-table is a byte-compiled function defined in
parseclj-alist.el.
Signature
(parseclj-hash-table &rest KVS)
Documentation
Create a hash table from the given keys and values KVS.
Arguments are simply provided in sequence, rather than as lists or cons cells. As "test" for the hash table, equal is used. The hash table is created without extra storage space, so with a size equal to amount of key-value pairs, since it is assumed to be treated as immutable. For example: (parseclj-hash-table :foo 123 :bar 456)
Source Code
;; Defined in ~/.emacs.d/elpa/parseclj-20261002.1230/parseclj-alist.el
(defun parseclj-hash-table (&rest kvs)
"Create a hash table from the given keys and values KVS.
Arguments are simply provided in sequence, rather than as lists
or cons cells. As \"test\" for the hash table, equal is used. The
hash table is created without extra storage space, so with a size
equal to amount of key-value pairs, since it is assumed to be
treated as immutable.
For example: (parseclj-hash-table :foo 123 :bar 456)"
;; Emacs 27:
;; (map-into kvs 'hash-table)
(let* ((kv-pairs (seq-partition kvs 2))
(hash-map (make-hash-table :test 'equal :size (length kv-pairs))))
(seq-do (lambda (pair)
(puthash (car pair) (cadr pair) hash-map))
kv-pairs)
hash-map))