diff options
author | colin <colin@cicadas.surf> | 2024-06-18 08:47:42 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2024-06-18 08:47:42 -0700 |
commit | 2111f61524e5fbdf843950de60740f3a15b5274f (patch) | |
tree | 448a1feea5e3e237ba4e39ff63b30ab5a0e6c3e7 /def.lisp | |
parent | 06f8c9c96a1d13451276ded4e091175eafd5b4e9 (diff) |
Fix: docstring in def:fast; update readme
Diffstat (limited to 'def.lisp')
-rw-r--r-- | def.lisp | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -133,8 +133,10 @@ E.g. (if other (cons var other) var) ll)))) :finally (return (values (nreverse ll) types))) - `(defun ,name ,lambda-list - (declare ,@type-declarations - (values ,return-type) - (optimize (speed 3) (safety 0))) - ,@body))) + (let ((docstring (when (stringp (first body)) (first body)))) + `(defun ,name ,lambda-list + ,@(when docstring (list docstring)) + (declare ,@type-declarations + (values ,return-type) + (optimize (speed 3) (safety 0))) + ,@(if docstring (rest body) body))))) |