Handbook
Glossary
score-question ( question input -- question/f )
Vocabulary
quiz
Inputs
question
an
object
input
an
object
Outputs
question/f
an
object
Definition
USING:
accessors
io
kernel
prettyprint
sequences
strings
;
IN:
quiz
:
score-question
( question input -- question/f )
dup
{
f
"q"
}
member?
[
2drop
f
]
[
>>response
dup
[
response>>
]
keep
parse-response
>>parsed-response
dup
check-response
>>correct?
dup
answer>>
dup
string?
[
print
]
[
.
]
if
]
if
;