Handbook
Glossary
adjacent-indices ( n max -- n-1 n n+1 )
Vocabulary
game-of-life
Inputs
n
an
object
max
an
object
Outputs
n-1
an
object
n
an
object
n+1
an
object
Definition
USING:
kernel
math
math.private
;
IN:
game-of-life
::
adjacent-indices
( n max -- n-1 n n+1 )
n
[
max
]
when-zero
1
fixnum-fast
n n 1
fixnum+fast
dup
max
=
[
drop
0
]
when
;
inline