aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blackjack.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/blackjack.lisp b/blackjack.lisp
index a8f818e..83c9c5c 100644
--- a/blackjack.lisp
+++ b/blackjack.lisp
@@ -1,12 +1,13 @@
+(defconst *aces* '(A))
+(defconst *faces* '(J Q K))
+
(defun acep (x)
(declare (xargs :guard t))
- (eq x 'A))
+ (and (member x *aces*) t))
(defun facep (x)
(declare (xargs :guard t))
- (case x
- ((J Q K) t)
- (t nil)))
+ (and (member x *faces*) t))
(defun rankp (x)
(declare (xargs :guard t))