Handbook
Glossary
?roll-over ( x max -- x )
Vocabulary
snake-game
.
game
Inputs
x
an
object
max
an
object
Outputs
x
an
object
Definition
USING:
combinators
kernel
math
;
IN:
snake-game.game
:
?roll-over
( x max -- x )
{
{
[
2dup
>=
]
[
2drop
0
]
}
{
[
over
neg?
]
[
nip
1
-
]
}
[
drop
]
}
cond
;