Handbook
Glossary
hashtable-cursor
Vocabulary
cursors
Definition
USING:
hashtables
math
;
IN:
cursors
TUPLE:
hashtable-cursor
{
hashtable
hashtable
read-only
initial:
H{
}
}
{
n
fixnum
read-only
initial:
0
}
;
Methods
USING:
accessors
combinators.short-circuit
cursors
kernel
;
M:
hashtable-cursor
cursor-compatible?
{
[
[
hashtable-cursor?
]
both?
]
[
[
hashtable>>
]
bi@
eq?
]
}
2&&
;
inline
USING:
accessors
assocs
cursors
kernel
;
M:
hashtable-cursor
cursor-distance-hint
nip
hashtable>>
assoc-size
;
inline
USING:
accessors
cursors
cursors.private
kernel
math
sequences.private
;
M:
hashtable-cursor
cursor-key-value-unsafe
[
n>>
]
[
hashtable>>
array>>
]
bi
[
nth-unsafe
]
[
[
1
+
]
dip
nth-unsafe
]
2bi
;
inline
USING:
accessors
cursors
kernel
sequences
;
M:
hashtable-cursor
cursor-valid?
[
n>>
]
[
hashtable>>
array>>
]
bi
bounds-check?
;
inline
USING:
accessors
cursors
kernel
;
M:
hashtable-cursor
cursor=
[
n>>
]
bi@
=
;
inline
USING:
accessors
cursors
cursors.private
kernel
math
;
M:
hashtable-cursor
inc-cursor
[
hashtable>>
dup
array>>
]
[
n>>
2
+
]
bi
(inc-hashtable-cursor)
<hashtable-cursor>
;
inline