hashtables.identity: support assoc-like

db4
Joe Groff 2011-11-01 19:38:42 -07:00
parent 7da8a9776f
commit 575f7fd663
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,9 @@ M: identity-hashtable clone
: >identity-hashtable ( assoc -- ihashtable )
[ assoc-size <identity-hashtable> ] keep assoc-union! ;
M: identity-hashtable assoc-like
drop dup identity-hashtable? [ >identity-hashtable ] unless ; inline
SYNTAX: IH{ \ } [ >identity-hashtable ] parse-literal ;
{ "hashtables.identity" "prettyprint" } "hashtables.identity.prettyprint" require-when