Handbook
Glossary
read-guess ( -- guess/f )
Vocabulary
wordlet
Inputs
None
Outputs
guess/f
an
object
Definition
USING:
ascii
io
kernel
sequences
sets
wordlet.private
;
IN:
wordlet
:
read-guess
( -- guess/f )
"guess: "
write
readln
>lower
dup
[
dup
length
5
=
[
" needs to have 5 letters"
append
print
read-guess
]
unless
dup
word-list
in?
[
" not in the word list"
append
print
read-guess
]
unless
]
when
;