]> gitweb.factorcode.org Git - factor.git/commitdiff
hash-sets: simpler <hash-set>.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 3 Sep 2011 23:38:42 +0000 (16:38 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 3 Sep 2011 23:38:42 +0000 (16:38 -0700)
core/hash-sets/hash-sets.factor

index 6a03bd02d9757e9a50ab33bb503507a1e38640b9..44de159a61b123db739783a16e0e89fea9a78914 100644 (file)
@@ -9,9 +9,7 @@ IN: hash-sets
 TUPLE: hash-set { table hashtable read-only } ;
 
 : <hash-set> ( members -- hash-set )
-    dup length <hashtable> [
-        [ dupd set-at ] curry each
-    ] keep hash-set boa ;
+    unique hash-set boa ; inline
 
 INSTANCE: hash-set set
 M: hash-set in? table>> key? ; inline