Handbook
Glossary
correct? ( actual guess -- ? )
Vocabulary
numbers-game
Inputs
actual
an
object
guess
an
object
Outputs
?
an
object
Definition
USING:
combinators
io
math.order
;
IN:
numbers-game
:
correct?
( actual guess -- ? )
<=>
{
{
+lt+
[
"Too high"
print
flush
f
]
}
{
+eq+
[
"Correct - you win!"
print
flush
t
]
}
{
+gt+
[
"Too low"
print
flush
f
]
}
}
case
;