Created
July 25, 2020 11:14
-
-
Save hyotang666/99db5d7f64b86e98ce68059a52021694 to your computer and use it in GitHub Desktop.
This file contains 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 |#(-reader| (stream character number) | |
(declare (ignore character number)) | |
`(load-time-value (numcl:asarray ',(read-delimited-list #\) stream t)))) | |
(defun |#A-reader| (stream character number) | |
(declare (ignore character)) | |
`(load-time-value (let ((array (numcl:asarray ',(read stream t t t)))) | |
(assert (= (array-rank array) ,number)) | |
array))) | |
(named-readtables:defreadtable numcl::numcl-reader | |
(:merge :standard) | |
(:dispatch-macro-char #\# #\( '|#(-reader|) | |
(:dispatch-macro-char #\# #\A '|#A-reader|)) | |
(named-readtables:in-readtable numcl::numcl-reader) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment