Handbook
Glossary
main-loop ( x -- )
Vocabulary
rosetta-code
.
bulls-and-cows
Inputs
x
an
object
Outputs
None
Definition
USING:
io
kernel
;
IN:
rosetta-code.bulls-and-cows
:
main-loop
( x -- )
"Enter a 4 digit number: "
write
flush
validate-readln
num>hash
swap
[
sum-score
swap
score-to-answer
print
flush
]
1check
not
[
main-loop
]
[
drop
win
]
if
;