Handbook
Glossary
snake-part? ( object -- ? )
Vocabulary
snake-game
.
game
Inputs and outputs
object
an
object
?
a
boolean
Word description
Tests if the object is an instance of the
snake-part
class.
Definition
USING:
classes.tuple.private
kernel
slots.private
;
IN:
snake-game.game
:
snake-part?
( object -- ? )
dup
tuple?
[
layout-of
7
slot
\
snake-part
eq?
]
[
drop
f
]
if
;