From 6a04badd8bcfd271d29b6d9af08ca5f031a194d8 Mon Sep 17 00:00:00 2001 From: Gerd Heber Date: Sat, 8 Aug 2015 15:20:46 -0500 Subject: [PATCH] Make CMBN-NO-ZERO-P return a boolean instead of CMBN-LIST. --- src/macros.lisp | 2 +- test/combinations-test.lisp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macros.lisp b/src/macros.lisp index fae82f5..0e9d9ca 100644 --- a/src/macros.lisp +++ b/src/macros.lisp @@ -134,7 +134,7 @@ CMBN-NON-ZERO-P Args: (cmbn) Tests if the combination CMBN is a non-null combination of any degree. ------------------------------------------------------------------------------" - `(cmbn-list ,cmbn)) + `(not (null (cmbn-list ,cmbn)))) (DEFMACRO CMBN-ZERO-P (cmbn) diff --git a/test/combinations-test.lisp b/test/combinations-test.lisp index c65e74b..c281e14 100644 --- a/test/combinations-test.lisp +++ b/test/combinations-test.lisp @@ -65,7 +65,7 @@ (is (equal (cat:cmbn-list comb) nil))) (is (null (cat:cmbn-non-zero-p (cat:cmbn 0)))) - (is (equal (cat:cmbn-non-zero-p (cat:cmbn 0 1 'a)) '((1 . a)))) + (is (cat:cmbn-non-zero-p (cat:cmbn 0 1 'a))) (is (cat:cmbn-zero-p (cat:cmbn 0))) (is (null (cat:cmbn-zero-p (cat:cmbn 0 1 'a)))))