Created
July 10, 2019 15:43
-
-
Save fouric/ced465a3c22c4aac6f20ce6c14c17adb 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
(set-dispatch-macro-character #\# #\l | |
(lambda (stream c n) | |
(declare (ignore c)) | |
(let ((list (read stream nil (values) t)) | |
(arg-names '(x y z w))) | |
(when (consp list) | |
(let ((n (if n | |
(min (1- (length arg-names)) n) | |
0))) | |
`(lambda (,@(subseq arg-names 0 n)) | |
,list)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment