hashtables.identity: support assoc-like

Joe Groff 2011-11-01 19:38:42 -07:00
parent 2a64c3ed69
commit 19eca5cbdd
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,9 @@ M: identity-hashtable clone
: >identity-hashtable ( assoc -- ihashtable ) : >identity-hashtable ( assoc -- ihashtable )
[ assoc-size <identity-hashtable> ] keep assoc-union! ; [ 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 ; SYNTAX: IH{ \ } [ >identity-hashtable ] parse-literal ;
{ "hashtables.identity" "prettyprint" } "hashtables.identity.prettyprint" require-when { "hashtables.identity" "prettyprint" } "hashtables.identity.prettyprint" require-when