]> gitweb.factorcode.org Git - factor.git/commitdiff
Add passociate word: like associate but for persistent hashtables
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 13 Nov 2008 06:10:37 +0000 (00:10 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 13 Nov 2008 06:10:37 +0000 (00:10 -0600)
basis/persistent/hashtables/hashtables.factor

index a867dbb2e31859e059f01b1e92f5ebc6fa5684bb..e50fd52c1051eb52391929295546f852deb2475b 100644 (file)
@@ -53,3 +53,6 @@ M: persistent-hash clone ;
 M: persistent-hash pprint-delims drop \ PH{ \ } ;
 M: persistent-hash >pprint-sequence >alist ;
 M: persistent-hash pprint* pprint-object ;
+
+: passociate ( value key -- phash )
+    T{ persistent-hash } new-at ; inline