diff --git a/core/hash-sets/hash-sets-tests.factor b/core/hash-sets/hash-sets-tests.factor index ca995a38e6..2432d9c5bf 100644 --- a/core/hash-sets/hash-sets-tests.factor +++ b/core/hash-sets/hash-sets-tests.factor @@ -34,3 +34,7 @@ IN: hash-sets.tests [ t ] [ HS{ } null? ] unit-test [ f ] [ HS{ 1 } null? ] unit-test + +{ { } } [ { 1 2 3 } duplicates ] unit-test +{ f } [ { 1 2 3 } >hash-set duplicates ] unit-test +{ { 1 } } [ { 1 2 1 } duplicates ] unit-test diff --git a/core/hash-sets/hash-sets.factor b/core/hash-sets/hash-sets.factor index 6e624dec70..c009593c58 100644 --- a/core/hash-sets/hash-sets.factor +++ b/core/hash-sets/hash-sets.factor @@ -31,7 +31,7 @@ M: sequence fast-set >hash-set ; M: f fast-set drop H{ } clone hash-set boa ; M: sequence duplicates - f fast-set [ [ in? ] [ adjoin ] 2bi ] curry filter ; + f fast-set [ ?adjoin not ] curry filter ;