]> gitweb.factorcode.org Git - factor.git/commit
hashtables: Preserve access semantics for alist >hashtable conversion
authortimor <timor.dd@googlemail.com>
Wed, 21 Jul 2021 19:28:00 +0000 (21:28 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 21 Jul 2021 20:36:43 +0000 (13:36 -0700)
commit471289907c4443ca239835e68c61118fbbf12498
treedef00cc311b96da943aabffa1a3456f9453a2f64
parent5b1c814d84714b0c94c5a7b4aeb3f44d2a4d5998
hashtables: Preserve access semantics for alist >hashtable conversion

Alists have a left-to-right first key occurrence wins access strategy.  This
changes the iteration order when converting an alist via `>hashtable`, so that
the first entry will dominate the resulting assoc.
core/hashtables/hashtables-tests.factor
core/hashtables/hashtables.factor