Created
August 14, 2013 02:22
-
-
Save TheTomster/6227507 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 generate-typecode (name arg-types return-type defn) | |
(push (list name (types-from-arglist arg-types) return-type) | |
*type-registry*) | |
`(let ((localtypes nil)) | |
,(loop for (type argname) in (pairs arg-types) | |
collect `(push (cons ,argname ,type) localtypes)) | |
,(loop for (fname &rest args) in defn | |
collect (cond | |
((keywordp fname) (generate-type-assertion fname args)) | |
(t 't))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment