]> gitweb.factorcode.org Git - factor.git/commitdiff
Revert "hashtables: Preserve access semantics for alist >hashtable conversion"
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 24 Jul 2021 15:30:19 +0000 (08:30 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 24 Jul 2021 15:30:19 +0000 (08:30 -0700)
This reverts commit 471289907c4443ca239835e68c61118fbbf12498.

core/hashtables/hashtables-tests.factor
core/hashtables/hashtables.factor

index d2a2c141860d6b809897ffe867f052b732eed4cb..96ae5f71a949d1aec30c55842244d4617b801854 100644 (file)
@@ -184,7 +184,3 @@ H{ } "x" set
 
 ! Random test case
 { "A" } [ 100 <iota> [ dup ] H{ } map>assoc 32 over delete-at "A" 32 pick set-at 32 of ] unit-test
-
-! Alists have prefix priority
-{ 42 } [ { { 1 42 } { 2 10 } { 1 20 } } 1 of ] unit-test
-{ 42 } [ { { 1 42 } { 2 10 } { 1 20 } } >hashtable 1 of ] unit-test
index b445390898636e5b5aebd50243b55f549d01bf5a..79fe86093db7d4bcb46aba47492208ab61a8db35 100644 (file)
@@ -91,7 +91,7 @@ TUPLE: hashtable
     dupd new-key@ set-nth-pair ; inline
 
 : (rehash) ( alist hash -- )
-    [ <reversed> ] dip [ swapd (set-at) ] curry assoc-each ; inline
+    [ swapd (set-at) ] curry assoc-each ; inline
 
 : hash-large? ( hash -- ? )
     [ count>> 1 fixnum+fast 3 fixnum*fast ]