diff options
author | colin <colin@cicadas.surf> | 2024-04-19 10:36:09 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2024-04-19 10:36:09 -0700 |
commit | 73d17124df0a837fe7ca400a0c79a9fa5c6dfbe9 (patch) | |
tree | 340be3a9618308a9e1195d8673d00a94bbf147aa | |
parent | 66ca9f2d15eb65b3a576abae5fc137c342f14a93 (diff) |
Refactored to reuse variablep
-rw-r--r-- | obwyn.lisp | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -18,10 +18,9 @@ (:is (not (values-binding-p :x))) (:is (not (values-binding-p '(a b 4)))) (:is (not (values-binding-p '(a :b 4))))) - (or (and (symbolp form) - (not (keywordp form))) + (or (variablep form) (and (listp form) - (every (a:conjoin #'symbolp (complement #'keywordp)) form)))) + (every #'variablep form)))) (defun destructuring-bind-list-p (form) #+testiere @@ -129,7 +128,7 @@ (<predicate-binding-clause> :match (:seq (:@ var (:item)) (:= :when=) (:@ form (:item))) - :if (and (symbolp var) (not (keywordp var))) + :if variablep :then (list :when= var form) :note "Bind variable to form, exit early if form evaluated to nil.") |