recursive-hashcode ( n obj quot -- code )
Vocabulary
combinators
Inputs and outputs
n
an
integer
obj
an
object
quot
a
quotation
with stack effect
( n obj -- code )
code
an
integer
Word description
A combinator used to implement methods for the
hashcode*
generic word. If
n
is less than or equal to zero, outputs 0, otherwise calls the quotation.
Definition
USING:
kernel
math
;
IN:
combinators
:
recursive-hashcode
( n obj quot -- code )
pick
0
<=
[
3drop
0
]
[
[
1
-
]
2dip
call
]
if
;
inline