hashtables.wrapped: INSTANCE: assoc and support new-assoc.
parent
ccda811114
commit
cde26a3356
|
@ -34,6 +34,8 @@ M: identity-hashtable clone
|
|||
M: identity-hashtable assoc-like
|
||||
drop dup identity-hashtable? [ >identity-hashtable ] unless ; inline
|
||||
|
||||
M: identity-hashtable new-assoc drop <identity-hashtable> ;
|
||||
|
||||
SYNTAX: IH{ \ } [ >identity-hashtable ] parse-literal ;
|
||||
|
||||
{ "hashtables.identity" "prettyprint" } "hashtables.identity.prettyprint" require-when
|
||||
|
|
|
@ -31,6 +31,8 @@ M: sequence-hashtable clone
|
|||
: >sequence-hashtable ( assoc -- shashtable )
|
||||
[ assoc-size <sequence-hashtable> ] keep assoc-union! ;
|
||||
|
||||
M: sequence-hashtable new-assoc drop <sequence-hashtable> ;
|
||||
|
||||
SYNTAX: SH{ \ } [ >sequence-hashtable ] parse-literal ;
|
||||
|
||||
{ "hashtables.sequences" "prettyprint" } "hashtables.sequences.prettyprint" require-when
|
||||
|
|
|
@ -42,4 +42,6 @@ M: wrapped-hashtable >alist
|
|||
M: wrapped-hashtable equal?
|
||||
over wrapped-hashtable? [ [ underlying>> ] bi@ = ] [ 2drop f ] if ;
|
||||
|
||||
INSTANCE: wrapped-hashtable assoc
|
||||
|
||||
{ "hashtables.wrapped" "prettyprint" } "hashtables.wrapped.prettyprint" require-when
|
||||
|
|
Loading…
Reference in New Issue