diff options
author | colin <colin@cicadas.surf> | 2023-11-30 07:33:36 -0800 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-11-30 07:33:36 -0800 |
commit | 567afaffc610e8645e05f14a685fba770a4d7f65 (patch) | |
tree | d0f737d57bdf44d156631c0eba48b58ea0580f44 | |
parent | 40b881dc4740463c038c329b5a472ae0a98eb0a3 (diff) |
Moved outside of defun
-rw-r--r-- | terrafirma.lisp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/terrafirma.lisp b/terrafirma.lisp index 62d063c..78d74c9 100644 --- a/terrafirma.lisp +++ b/terrafirma.lisp @@ -52,8 +52,7 @@ (cond ((and name (symbolp name)) name) ((symbolp type) (intern (format nil "VALIDATED-~a" type))) (t (error "Validator Name: Either TYPE must be a symbol or a NAME must be provided."))))) - `(defun ,validator-name (,var) - (macrolet ((validate (check msg &rest args) + `(macrolet ((validate (check msg &rest args) (let ((suberr (gensym))) `(prog1 t (let (,suberr) @@ -63,8 +62,7 @@ :instance terrafirma::*instance* :reason (format nil ,msg ,@args) :suberror ,suberr)))))) - + (defun ,validator-name (,var) (let ((terrafirma::*type* ',type) (terrafirma::*instance* ,var)) ,@body))))) - |