Handbook
Glossary
id-persistent-hash
Vocabulary
persistent
.
hashtables
.
identity
Definition
USING:
persistent.hashtables
;
IN:
persistent.hashtables.identity
TUPLE:
id-persistent-hash
<
persistent-hash
;
Methods
USING:
assocs
persistent.hashtables.identity
prettyprint.custom
;
M:
id-persistent-hash
>pprint-sequence
>alist
;
USING:
accessors
assocs
kernel
math
persistent.hashtables.identity
persistent.hashtables.nodes
;
M:
id-persistent-hash
at*
[
dup
identity-hashcode
>fixnum
]
[
root>>
]
bi*
(entry-at)
dup
[
value>>
t
]
[
f
]
if
;
USING:
assocs
kernel
persistent.hashtables.identity
;
M:
id-persistent-hash
equal?
over
id-persistent-hash?
[
assoc=
]
[
2drop
f
]
if
;
USING:
accessors
kernel
math
persistent.assocs
persistent.hashtables.identity
persistent.hashtables.nodes
;
M:
id-persistent-hash
new-at
[
[
0
]
3dip
[
dup
identity-hashcode
>fixnum
]
[
root>>
]
bi*
(new-at)
1 0
?
]
[
count>>
]
bi
+
id-persistent-hash
boa
;
USING:
accessors
combinators
kernel
math
persistent.assocs
persistent.hashtables.identity
persistent.hashtables.nodes
;
M:
id-persistent-hash
pluck-at
[
[
dup
identity-hashcode
>fixnum
]
[
root>>
]
bi*
(pluck-at)
]
keep
{
{
[
2dup
root>>
eq?
]
[
nip
]
}
{
[
over
not
]
[
2drop
IPH{
}
]
}
[
count>>
1
-
id-persistent-hash
boa
]
}
cond
;
USING:
persistent.hashtables.identity
prettyprint.backend
prettyprint.custom
;
M:
id-persistent-hash
pprint*
[
pprint-object
]
with-extra-nesting-level
;
USING:
kernel
persistent.hashtables.identity
prettyprint.custom
;
M:
id-persistent-hash
pprint-delims
drop
\
IPH{
\
}
;