From 19eca5cbdde8837d13adea906dadefe2ded565a5 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Tue, 1 Nov 2011 19:38:42 -0700 Subject: [PATCH] hashtables.identity: support assoc-like --- basis/hashtables/identity/identity.factor | 3 +++ 1 file changed, 3 insertions(+) diff --git a/basis/hashtables/identity/identity.factor b/basis/hashtables/identity/identity.factor index 88f4de5c92..0741a53bda 100644 --- a/basis/hashtables/identity/identity.factor +++ b/basis/hashtables/identity/identity.factor @@ -31,6 +31,9 @@ M: identity-hashtable clone : >identity-hashtable ( assoc -- ihashtable ) [ assoc-size ] 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