Handbook
Glossary
(new-key@) ( key array i probe# j -- array i j empty? )
Vocabulary
hashtables
.
private
Inputs
key
an
object
array
an
object
i
an
object
probe#
an
object
j
an
object
Outputs
array
an
object
i
an
object
j
an
object
empty?
an
object
Definition
USING:
kernel
sequences.private
;
IN:
hashtables.private
:
(new-key@)
( key array i probe# j -- array i j empty? )
[
2dup
swap
array-nth
]
2dip
pick
tombstone?
[
rot
+empty+
eq?
[
nip
[
drop
]
3dip
t
]
[
pick
or
[
probe
]
dip
(new-key@)
]
if
]
[
[
pickd
=
]
2dip
rot
[
nip
[
drop
]
3dip
f
]
[
[
probe
]
dip
(new-key@)
]
if
]
if
;
inline
recursive