Define the exact length of question
This commit is contained in:
parent
31cbd9edc4
commit
e7570c2721
1 changed files with 8 additions and 6 deletions
|
@ -65,12 +65,14 @@ A valid question is a list of alternating keywords and either strings or lists
|
||||||
satisfying `choicesp`.
|
satisfying `choicesp`.
|
||||||
|
|
||||||
Returns T if it's a valid question, otherwise NIL."
|
Returns T if it's a valid question, otherwise NIL."
|
||||||
(loop for i from 0 below (length lst)
|
(if (= (length lst) 6)
|
||||||
for elem = (nth i lst)
|
(loop for i from 0 below (length lst)
|
||||||
always (if (evenp i)
|
for elem = (nth i lst)
|
||||||
(keywordp elem)
|
always (if (evenp i)
|
||||||
(or (stringp elem)
|
(keywordp elem)
|
||||||
(choicesp elem)))))
|
(or (stringp elem)
|
||||||
|
(choicesp elem))))
|
||||||
|
nil))
|
||||||
|
|
||||||
(deftype question ()
|
(deftype question ()
|
||||||
"Represents a valid question list.
|
"Represents a valid question list.
|
||||||
|
|
Loading…
Add table
Reference in a new issue