summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-04-19 10:36:09 -0700
committercolin <colin@cicadas.surf>2024-04-19 10:36:09 -0700
commit73d17124df0a837fe7ca400a0c79a9fa5c6dfbe9 (patch)
tree340be3a9618308a9e1195d8673d00a94bbf147aa
parent66ca9f2d15eb65b3a576abae5fc137c342f14a93 (diff)
Refactored to reuse variablep
-rw-r--r--obwyn.lisp7
1 files changed, 3 insertions, 4 deletions
diff --git a/obwyn.lisp b/obwyn.lisp
index e9f8c33..1b3193f 100644
--- a/obwyn.lisp
+++ b/obwyn.lisp
@@ -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.")