From 296968580ad5917a6ef65d34b1eb8ecf2010b7e8 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 12 May 2015 19:08:42 -0700 Subject: [PATCH] use assoc-reject instead of [ ... not ] assoc-filter. --- basis/compiler/cfg/liveness/liveness.factor | 2 +- .../compiler/cfg/representations/selection/selection.factor | 2 +- basis/compiler/cfg/stacks/local/local.factor | 2 +- basis/compiler/crossref/crossref.factor | 2 +- basis/core-foundation/fsevents/fsevents.factor | 2 +- basis/furnace/auth/providers/couchdb/couchdb.factor | 2 +- basis/hints/hints.factor | 2 +- basis/html/templates/chloe/compiler/compiler.factor | 2 +- basis/html/templates/chloe/components/components.factor | 2 +- basis/math/floats/env/env.factor | 2 +- basis/prettyprint/backend/backend.factor | 2 +- basis/regexp/disambiguate/disambiguate.factor | 2 +- basis/soundex/soundex.factor | 2 +- basis/tools/coverage/coverage.factor | 2 +- basis/tools/deploy/shaker/shaker.factor | 6 +++--- basis/tools/profiler/sampling/sampling.factor | 2 +- basis/ui/tools/listener/listener-docs.factor | 2 +- basis/unicode/data/data.factor | 2 +- basis/vocabs/cache/cache.factor | 2 +- core/alien/alien.factor | 2 +- core/generic/single/single.factor | 2 +- core/vocabs/parser/parser.factor | 2 +- extra/assocs/extras/extras.factor | 2 +- extra/koszul/koszul.factor | 2 +- extra/managed-server/managed-server.factor | 2 +- extra/multi-methods/multi-methods.factor | 2 +- extra/tools/gc-decode/gc-decode-tests.factor | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/basis/compiler/cfg/liveness/liveness.factor b/basis/compiler/cfg/liveness/liveness.factor index 8b57ff1834..33518b89d6 100644 --- a/basis/compiler/cfg/liveness/liveness.factor +++ b/basis/compiler/cfg/liveness/liveness.factor @@ -31,7 +31,7 @@ GENERIC: visit-insn ( live-set insn -- ) ! This would be much better if live-set was a real set : kill-defs ( live-set insn -- ) defs-vregs [ ?leader ] map - '[ drop ?leader _ in? not ] assoc-filter! drop ; inline + '[ drop ?leader _ in? ] assoc-reject! drop ; inline : gen-uses ( live-set insn -- ) uses-vregs [ swap conjoin ] with each ; inline diff --git a/basis/compiler/cfg/representations/selection/selection.factor b/basis/compiler/cfg/representations/selection/selection.factor index d91db52641..ba10a70305 100644 --- a/basis/compiler/cfg/representations/selection/selection.factor +++ b/basis/compiler/cfg/representations/selection/selection.factor @@ -139,7 +139,7 @@ M: vreg-insn compute-insn-costs ! For every vreg, compute preferred representation, that minimizes costs. : minimize-costs ( costs -- representations ) - [ nip assoc-empty? not ] assoc-filter + [ nip assoc-empty? ] assoc-reject [ >alist alist-min first ] assoc-map ; : compute-representations ( cfg -- ) diff --git a/basis/compiler/cfg/stacks/local/local.factor b/basis/compiler/cfg/stacks/local/local.factor index f26bf76654..7b1abd8d84 100644 --- a/basis/compiler/cfg/stacks/local/local.factor +++ b/basis/compiler/cfg/stacks/local/local.factor @@ -80,7 +80,7 @@ SYMBOLS: local-peek-set replaces ; H{ } clone replaces set ; : remove-redundant-replaces ( replaces -- replaces' ) - [ [ loc>vreg ] dip = not ] assoc-filter ; + [ [ loc>vreg ] dip = ] assoc-reject ; : end-local-analysis ( basic-block -- ) [ diff --git a/basis/compiler/crossref/crossref.factor b/basis/compiler/crossref/crossref.factor index c078e7fe35..2e81f2674a 100644 --- a/basis/compiler/crossref/crossref.factor +++ b/basis/compiler/crossref/crossref.factor @@ -34,7 +34,7 @@ generic-call-site-crossref [ H{ } clone ] initialize : outdated-conditional-usages ( set -- assocs ) members H{ } clone '[ conditional-dependencies-of - [ drop _ dependencies-satisfied? not ] assoc-filter + [ drop _ dependencies-satisfied? ] assoc-reject ] map ; : generic-call-sites-of ( word -- assoc ) diff --git a/basis/core-foundation/fsevents/fsevents.factor b/basis/core-foundation/fsevents/fsevents.factor index ad8f5ea7ad..d0bbf17f7a 100644 --- a/basis/core-foundation/fsevents/fsevents.factor +++ b/basis/core-foundation/fsevents/fsevents.factor @@ -170,7 +170,7 @@ SYMBOL: event-stream-callbacks [ event-stream-callbacks - [ [ drop expired? not ] assoc-filter H{ } assoc-like ] change-global + [ [ drop expired? ] assoc-reject H{ } assoc-like ] change-global ] "core-foundation" add-startup-hook : add-event-source-callback ( quot -- id ) diff --git a/basis/furnace/auth/providers/couchdb/couchdb.factor b/basis/furnace/auth/providers/couchdb/couchdb.factor index 1a58c5e434..959e9825d6 100644 --- a/basis/furnace/auth/providers/couchdb/couchdb.factor +++ b/basis/furnace/auth/providers/couchdb/couchdb.factor @@ -119,7 +119,7 @@ TUPLE: couchdb-auth-provider ((get-user)) ; : strip-hash ( hash1 -- hash2 ) - [ drop first CHAR: _ = not ] assoc-filter ; + [ drop first CHAR: _ = ] assoc-reject ; : at-or-k ( key hash -- newkey ) dupd at [ nip ] when* ; diff --git a/basis/hints/hints.factor b/basis/hints/hints.factor index 9177b81cd9..d1272b45d8 100644 --- a/basis/hints/hints.factor +++ b/basis/hints/hints.factor @@ -26,7 +26,7 @@ M: object specializer-declaration class-of ; : make-specializer ( specs -- quot ) dup length iota [ (picker) 2array ] 2map - [ drop object eq? not ] assoc-filter + [ drop object eq? ] assoc-reject [ [ t ] ] [ [ swap specializer-predicate append ] { } assoc>map [ ] [ swap [ f ] \ if 3array append [ ] like ] map-reduce diff --git a/basis/html/templates/chloe/compiler/compiler.factor b/basis/html/templates/chloe/compiler/compiler.factor index 74409e6d8e..1c7c73c90f 100644 --- a/basis/html/templates/chloe/compiler/compiler.factor +++ b/basis/html/templates/chloe/compiler/compiler.factor @@ -10,7 +10,7 @@ IN: html.templates.chloe.compiler [ drop chloe-name? ] assoc-filter ; : non-chloe-attrs-only ( assoc -- assoc' ) - [ drop chloe-name? not ] assoc-filter ; + [ drop chloe-name? ] assoc-reject ; : chloe-tag? ( tag -- ? ) dup xml? [ body>> ] when diff --git a/basis/html/templates/chloe/components/components.factor b/basis/html/templates/chloe/components/components.factor index 3c1446b060..d3b55852d0 100644 --- a/basis/html/templates/chloe/components/components.factor +++ b/basis/html/templates/chloe/components/components.factor @@ -21,7 +21,7 @@ M: singleton-class component-tag ( tag class -- ) bi* ; : compile-component-attrs ( tag class -- ) - [ attrs>> [ drop main>> "name" = not ] assoc-filter ] dip + [ attrs>> [ drop main>> "name" = ] assoc-reject ] dip [ all-slots swap '[ name>> _ at compile-attr ] each ] [ [ boa ] [code-with] ] bi ; diff --git a/basis/math/floats/env/env.factor b/basis/math/floats/env/env.factor index 3185896871..d3034b2adf 100644 --- a/basis/math/floats/env/env.factor +++ b/basis/math/floats/env/env.factor @@ -55,7 +55,7 @@ HOOK: (fp-env-registers) cpu ( -- registers ) : fp-env-register ( -- register ) (fp-env-registers) first ; :: mask> ( bits assoc -- symbols ) - assoc [| k v | bits v mask zero? not ] assoc-filter keys ; + assoc [| k v | bits v mask zero? ] assoc-reject keys ; : >mask ( symbols assoc -- bits ) over empty? [ 2drop 0 ] diff --git a/basis/prettyprint/backend/backend.factor b/basis/prettyprint/backend/backend.factor index 0fd45feead..1d96a15a82 100644 --- a/basis/prettyprint/backend/backend.factor +++ b/basis/prettyprint/backend/backend.factor @@ -160,7 +160,7 @@ M: pathname pprint* ] if ; inline : filter-tuple-assoc ( slot,value -- name,value ) - [ [ initial>> ] dip = not ] assoc-filter + [ [ initial>> ] dip = ] assoc-reject [ [ name>> ] dip ] assoc-map ; : tuple>assoc ( tuple -- assoc ) diff --git a/basis/regexp/disambiguate/disambiguate.factor b/basis/regexp/disambiguate/disambiguate.factor index 256770c4e5..767e341073 100644 --- a/basis/regexp/disambiguate/disambiguate.factor +++ b/basis/regexp/disambiguate/disambiguate.factor @@ -66,7 +66,7 @@ TUPLE: parts in out ; dup new-transitions '[ [ _ swap '[ _ get-transitions ] assoc-map - [ nip empty? not ] assoc-filter + [ nip empty? ] assoc-reject ] preserving-epsilon ] assoc-map ] change-transitions ; diff --git a/basis/soundex/soundex.factor b/basis/soundex/soundex.factor index 37eaf08822..196fa7522c 100644 --- a/basis/soundex/soundex.factor +++ b/basis/soundex/soundex.factor @@ -11,7 +11,7 @@ TR: soundex-tr : remove-duplicates ( seq -- seq' ) #! Remove _consecutive_ duplicates (unlike prune which removes #! all duplicates). - [ 2 [ = not ] assoc-filter values ] [ first ] bi prefix ; + [ 2 [ = ] assoc-reject values ] [ first ] bi prefix ; : first>upper ( seq -- seq' ) 1 head >upper ; : trim-first ( seq -- seq' ) dup first [ = ] curry trim-head ; diff --git a/basis/tools/coverage/coverage.factor b/basis/tools/coverage/coverage.factor index cf9079d165..d21f516355 100644 --- a/basis/tools/coverage/coverage.factor +++ b/basis/tools/coverage/coverage.factor @@ -81,7 +81,7 @@ M: string coverage M: word coverage ( word -- seq ) "coverage" word-prop >alist - [ drop executed?>> not ] assoc-filter values ; + [ drop executed?>> ] assoc-reject values ; GENERIC: coverage. ( object -- ) diff --git a/basis/tools/deploy/shaker/shaker.factor b/basis/tools/deploy/shaker/shaker.factor index 7cd7465582..f4a56b8cf6 100755 --- a/basis/tools/deploy/shaker/shaker.factor +++ b/basis/tools/deploy/shaker/shaker.factor @@ -132,7 +132,7 @@ IN: tools.deploy.shaker "Stripping word properties" show swap '[ [ - [ drop _ member? not ] assoc-filter sift-values + [ drop _ member? ] assoc-reject sift-values >alist f like ] change-props drop ] each ; @@ -255,7 +255,7 @@ IN: tools.deploy.shaker dup array? [ [ 2 group - [ drop _ key? not ] assoc-filter + [ drop _ key? ] assoc-reject concat ] map ] when @@ -432,7 +432,7 @@ IN: tools.deploy.shaker stripped-globals :> to-strip cleared-globals :> to-clear global boxes>> - [ drop to-strip strip-global? not ] assoc-filter! + [ drop to-strip strip-global? ] assoc-reject! [ [ swap to-clear clear-global? diff --git a/basis/tools/profiler/sampling/sampling.factor b/basis/tools/profiler/sampling/sampling.factor index c874aeb6bf..4a6e6f7a5b 100644 --- a/basis/tools/profiler/sampling/sampling.factor +++ b/basis/tools/profiler/sampling/sampling.factor @@ -154,7 +154,7 @@ PRIVATE> [ total-time>> ] same? ; : trim-flat ( root-node -- root-node' ) - dup '[ [ nip _ redundant-flat-node? not ] assoc-filter ] change-children ; + dup '[ [ nip _ redundant-flat-node? ] assoc-reject ] change-children ; PRIVATE> diff --git a/basis/ui/tools/listener/listener-docs.factor b/basis/ui/tools/listener/listener-docs.factor index 34650de01b..db41fc96d0 100644 --- a/basis/ui/tools/listener/listener-docs.factor +++ b/basis/ui/tools/listener/listener-docs.factor @@ -53,7 +53,7 @@ ui.gadgets.editors ui.gestures ui.tools.listener ; ] change-commands drop multiline-editor update-gestures "interactor" interactor get-command-at [ - [ drop T{ key-down f { C+ } "k" } = not ] assoc-filter + [ drop T{ key-down f { C+ } "k" } = ] assoc-reject ] change-commands drop interactor update-gestures""" } $nl diff --git a/basis/unicode/data/data.factor b/basis/unicode/data/data.factor index 1f7336495c..49519ac3e1 100644 --- a/basis/unicode/data/data.factor +++ b/basis/unicode/data/data.factor @@ -135,7 +135,7 @@ PRIVATE> : process-combining ( data -- hash ) 3 swap (process-data) [ string>number ] assoc-map - [ nip zero? not ] assoc-filter + [ nip zero? ] assoc-reject >hashtable ; ! the maximum unicode char in the first 3 planes diff --git a/basis/vocabs/cache/cache.factor b/basis/vocabs/cache/cache.factor index 046c456331..4a2fa11723 100644 --- a/basis/vocabs/cache/cache.factor +++ b/basis/vocabs/cache/cache.factor @@ -10,7 +10,7 @@ IN: vocabs.cache [ root-cache get delete-at ] [ \ vocab-file-contents "memoize" word-prop swap - '[ drop first vocab-name _ = not ] assoc-filter! drop + '[ drop first vocab-name _ = ] assoc-reject! drop ] bi \ all-vocabs-recursive reset-memoized \ all-authors reset-memoized diff --git a/core/alien/alien.factor b/core/alien/alien.factor index 2d5e071a3c..15db709137 100755 --- a/core/alien/alien.factor +++ b/core/alien/alien.factor @@ -120,7 +120,7 @@ TUPLE: expiry-check object alien ; [ alien>> expired? ] [ t ] if* ; : delete-values ( value assoc -- ) - [ rot drop = not ] with assoc-filter! drop ; + [ rot drop = ] with assoc-reject! drop ; PRIVATE> diff --git a/core/generic/single/single.factor b/core/generic/single/single.factor index dc8e907f73..938e56bb36 100644 --- a/core/generic/single/single.factor +++ b/core/generic/single/single.factor @@ -82,7 +82,7 @@ C: predicate-engine ! 2. Convert methods : split-methods ( assoc class -- first second ) - [ [ nip class<= not ] curry assoc-filter ] + [ [ nip class<= ] curry assoc-reject ] [ [ nip class<= ] curry assoc-filter ] 2bi ; : convert-methods ( assoc class word -- assoc' ) diff --git a/core/vocabs/parser/parser.factor b/core/vocabs/parser/parser.factor index 3238fea960..8dbc82769d 100644 --- a/core/vocabs/parser/parser.factor +++ b/core/vocabs/parser/parser.factor @@ -205,7 +205,7 @@ PRIVATE> GENERIC: update ( search-path-elt -- valid? ) : trim-forgotten ( qualified-vocab -- valid? ) - [ [ nip "forgotten" word-prop not ] assoc-filter ] change-words + [ [ nip "forgotten" word-prop ] assoc-reject ] change-words words>> assoc-empty? not ; M: from update trim-forgotten ; diff --git a/extra/assocs/extras/extras.factor b/extra/assocs/extras/extras.factor index 5b1def17bc..737ff3b451 100644 --- a/extra/assocs/extras/extras.factor +++ b/extra/assocs/extras/extras.factor @@ -9,7 +9,7 @@ IN: assocs.extras [ nip ] assoc-filter ; inline : assoc-harvest ( assoc -- assoc' ) - [ nip empty? not ] assoc-filter ; inline + [ nip empty? ] assoc-reject ; inline : deep-at ( assoc seq -- value/f ) [ of ] each ; inline diff --git a/extra/koszul/koszul.factor b/extra/koszul/koszul.factor index 662162f532..4776d0f47f 100644 --- a/extra/koszul/koszul.factor +++ b/extra/koszul/koszul.factor @@ -20,7 +20,7 @@ IN: koszul } cond ; : canonicalize ( assoc -- assoc' ) - [ nip zero? not ] assoc-filter ; + [ nip zero? ] assoc-reject ; SYMBOL: terms diff --git a/extra/managed-server/managed-server.factor b/extra/managed-server/managed-server.factor index 3d4177988e..1c4027402f 100644 --- a/extra/managed-server/managed-server.factor +++ b/extra/managed-server/managed-server.factor @@ -32,7 +32,7 @@ M: managed-server handle-client-disconnect ; : client-streams ( -- assoc ) clients values ; : username ( -- string ) client username>> ; : everyone-else ( -- assoc ) - clients [ drop username = not ] assoc-filter ; + clients [ drop username = ] assoc-reject ; : everyone-else-streams ( -- assoc ) everyone-else values ; ERROR: no-such-client username ; diff --git a/extra/multi-methods/multi-methods.factor b/extra/multi-methods/multi-methods.factor index a22bd6f490..2909d0b9e7 100644 --- a/extra/multi-methods/multi-methods.factor +++ b/extra/multi-methods/multi-methods.factor @@ -114,7 +114,7 @@ SYMBOL: total : multi-predicate ( classes -- quot ) dup length iota [ picker 2array ] 2map - [ drop object eq? not ] assoc-filter + [ drop object eq? ] assoc-reject [ [ t ] ] [ [ (multi-predicate) ] { } assoc>map unclip [ swap [ f ] \ if 3array append [ ] like ] reduce diff --git a/extra/tools/gc-decode/gc-decode-tests.factor b/extra/tools/gc-decode/gc-decode-tests.factor index 556c8b277a..8471d11b23 100644 --- a/extra/tools/gc-decode/gc-decode-tests.factor +++ b/extra/tools/gc-decode/gc-decode-tests.factor @@ -82,7 +82,7 @@ IN: tools.gc-decode.tests : base-pointer-groups-decoded ( word -- seq ) word>gc-info base-pointer-groups [ - [ swap 2array ] map-index [ nip -1 = not ] assoc-filter + [ swap 2array ] map-index [ nip -1 = ] assoc-reject ] map ; ! base-pointer-groups