]> gitweb.factorcode.org Git - factor.git/commit
assocs.extras: Fix error with assoc-collapse with f as first element
authortimor <timor.dd@googlemail.com>
Thu, 22 Jul 2021 15:51:25 +0000 (17:51 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 22 Jul 2021 16:31:52 +0000 (09:31 -0700)
commit32827392983e9b040216a81f9a41d2292d9327b3
treed7ace00c57d6236b4f67a842ffaf06ea089b7995
parent471289907c4443ca239835e68c61118fbbf12498
assocs.extras: Fix error with assoc-collapse with f as first element

Since `assoc-collapse` uses a clone of the first assoc in the input sequence as
basis for the resulting assoc, this was failing when the first element was `f`.
Change behavior to return a hashtable instead, since this is the
default behavior for `f new-assoc` as well.
extra/assocs/extras/extras-tests.factor
extra/assocs/extras/extras.factor