Last active
August 29, 2015 13:56
-
-
Save ejbs/8924773 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun read-hash-list (stream) | |
(read-delimited-list #\} stream)) | |
(defun make-read-hash-table (stream char) | |
(declare (ignore char)) | |
(let ((a-list (read-hash-list stream)) | |
(ht (make-hash-table))) | |
(assert (evenp (length a-list))) | |
(loop for i = 0 then (+ i 2) until (= i (length a-list)) | |
do (setf (gethash (elt a-list i) ht) | |
(elt a-list (1+ i)))) | |
ht)) |
It's really just a minor bug that can be fixed during execution of read-hash-list. I knew about it but didn't really care enough to fix it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The issue is when you actually try using this - there's some extra setup that you have to do to make it work correctly.