From: Doug Coleman Date: Mon, 25 May 2009 02:46:59 +0000 (-0500) Subject: remove at-default. it was hardly used and it's just '?at drop' X-Git-Tag: 0.97~6202 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=5a3a14d1c908a27f060d484d6f127892d69806e9 remove at-default. it was hardly used and it's just '?at drop' --- diff --git a/basis/core-text/fonts/fonts.factor b/basis/core-text/fonts/fonts.factor index 4525509d44..2656811c1f 100644 --- a/basis/core-text/fonts/fonts.factor +++ b/basis/core-text/fonts/fonts.factor @@ -82,7 +82,7 @@ CONSTANT: font-names } : font-name ( string -- string' ) - font-names at-default ; + font-names ?at drop ; : (bold) ( x -- y ) kCTFontBoldTrait bitor ; inline diff --git a/basis/unicode/data/data.factor b/basis/unicode/data/data.factor index 318a56627b..1c6c6afdf3 100644 --- a/basis/unicode/data/data.factor +++ b/basis/unicode/data/data.factor @@ -33,9 +33,9 @@ VALUE: name-map : name>char ( name -- char ) name-map at ; inline : char>name ( char -- name ) name-map value-at ; inline : property? ( char property -- ? ) properties at interval-key? ; inline -: ch>lower ( ch -- lower ) simple-lower at-default ; inline -: ch>upper ( ch -- upper ) simple-upper at-default ; inline -: ch>title ( ch -- title ) simple-title at-default ; inline +: ch>lower ( ch -- lower ) simple-lower ?at drop ; inline +: ch>upper ( ch -- upper ) simple-upper ?at drop ; inline +: ch>title ( ch -- title ) simple-title ?at drop ; inline : special-case ( ch -- casing-tuple ) special-casing at ; inline ! For non-existent characters, use Cn diff --git a/basis/windows/fonts/fonts.factor b/basis/windows/fonts/fonts.factor index 1753ff1ce1..269e8f8f48 100755 --- a/basis/windows/fonts/fonts.factor +++ b/basis/windows/fonts/fonts.factor @@ -7,7 +7,7 @@ IN: windows.fonts { "sans-serif" "Tahoma" } { "serif" "Times New Roman" } { "monospace" "Courier New" } - } at-default ; + } ?at drop ; MEMO:: (cache-font) ( font -- HFONT ) font size>> neg ! nHeight diff --git a/core/assocs/assocs-docs.factor b/core/assocs/assocs-docs.factor index e56fedbd26..f971b8971b 100755 --- a/core/assocs/assocs-docs.factor +++ b/core/assocs/assocs-docs.factor @@ -66,7 +66,7 @@ ARTICLE: "assocs-lookup" "Lookup and querying of assocs" { $see-also at* assoc-size } ; ARTICLE: "assocs-values" "Transposed assoc operations" -"Most assoc words take a key and find the corresponding value. The following words take a value and find the corresponding key:" +"default Most assoc words take a key and find the corresponding value. The following words take a value and find the corresponding key:" { $subsection value-at } { $subsection value-at* } { $subsection value? } @@ -119,6 +119,7 @@ $nl { $subsection assoc-any? } { $subsection assoc-all? } "Additional combinators:" +{ $subsection assoc-partition } { $subsection cache } { $subsection map>assoc } { $subsection assoc>map } diff --git a/core/assocs/assocs-tests.factor b/core/assocs/assocs-tests.factor index fc74df6d45..c473ac0dfa 100644 --- a/core/assocs/assocs-tests.factor +++ b/core/assocs/assocs-tests.factor @@ -119,18 +119,6 @@ unit-test } extract-keys ] unit-test -[ f ] [ - "a" H{ { "a" f } } at-default -] unit-test - -[ "b" ] [ - "b" H{ { "a" f } } at-default -] unit-test - -[ "x" ] [ - "a" H{ { "a" "x" } } at-default -] unit-test - [ H{ { "b" [ 2 ] } { "d" [ 4 ] } } H{ { "a" [ 1 ] } { "c" [ 3 ] } } ] [ H{ { "a" [ 1 ] } diff --git a/core/assocs/assocs.factor b/core/assocs/assocs.factor index e783ef81c4..d655b99c30 100755 --- a/core/assocs/assocs.factor +++ b/core/assocs/assocs.factor @@ -82,9 +82,6 @@ PRIVATE> : at ( key assoc -- value/f ) at* drop ; inline -: at-default ( key assoc -- value/key ) - ?at drop ; inline - M: assoc assoc-clone-like ( assoc exemplar -- newassoc ) [ dup assoc-size ] dip new-assoc [ [ set-at ] with-assoc assoc-each ] keep ; diff --git a/misc/vim/syntax/factor.vim b/misc/vim/syntax/factor.vim index 86f4f19147..8da50017c8 100755 --- a/misc/vim/syntax/factor.vim +++ b/misc/vim/syntax/factor.vim @@ -47,7 +47,7 @@ syn keyword factorBoolean boolean f general-t t syn keyword factorCompileDirective inline foldable parsing syn keyword factorKeyword or tuck 2bi 2tri while wrapper nip 4dip wrapper? bi* callstack>array both? hashcode die dupd callstack callstack? 3dup tri@ pick curry build ?execute 3bi prepose >boolean ?if clone eq? tri* ? = swapd call-clear 2over 2keep 3keep clear 2dup when not tuple? dup 2bi* 2tri* call tri-curry object bi@ do unless* if* loop bi-curry* drop when* assert= retainstack assert? -rot execute 2bi@ 2tri@ boa with either? 3drop bi curry? datastack until 3dip over 3curry roll tri-curry* swap tri-curry@ 2nip and throw set-retainstack bi-curry (clone) hashcode* compose spin 2dip if 3tri unless compose? tuple keep 2curry equal? set-datastack assert tri 2drop most boolean? identity-tuple? null new set-callstack dip bi-curry@ rot -roll xor identity-tuple boolean -syn keyword factorKeyword ?at assoc? assoc-clone-like assoc= delete-at* assoc-partition extract-keys new-assoc value? assoc-size map>assoc push-at assoc-like key? assoc-intersect update assoc-union assoc-combine at* assoc-empty? at+ set-at assoc-all? assoc-subset? assoc-hashcode change-at assoc-each assoc-diff zip values value-at rename-at inc-at enum? at cache assoc>map assoc assoc-map enum value-at* remove-all assoc-map-as >alist assoc-filter-as substitute-here clear-assoc assoc-stack substitute assoc-filter 2cache delete-at assoc-find keys assoc-any? at-default unzip +syn keyword factorKeyword ?at assoc? assoc-clone-like assoc= delete-at* assoc-partition extract-keys new-assoc value? assoc-size map>assoc push-at assoc-like key? assoc-intersect update assoc-union assoc-combine at* assoc-empty? at+ set-at assoc-all? assoc-subset? assoc-hashcode change-at assoc-each assoc-diff zip values value-at rename-at inc-at enum? at cache assoc>map assoc assoc-map enum value-at* remove-all assoc-map-as >alist assoc-filter-as substitute-here clear-assoc assoc-stack substitute assoc-filter 2cache delete-at assoc-find keys assoc-any? unzip syn keyword factorKeyword case execute-effect dispatch-case-quot no-cond no-case? 3cleave>quot contiguous-range? 2cleave cond>quot wrong-values? no-cond? cleave>quot no-case hash-dispatch-quot case>quot 3cleave wrong-values alist>quot hash-case-table hash-case-quot case-find (distribute-buckets) cond cleave distribute-buckets call-effect 2cleave>quot recursive-hashcode linear-case-quot spread spread>quot syn keyword factorKeyword byte-array>bignum sgn >bignum next-float number= each-integer next-power-of-2 ?1+ fp-special? imaginary-part mod recip float>bits rational >float number? 2^ bignum? integer fixnum? neg fixnum sq bignum fp-snan? fp-infinity? denominator (all-integers?) times find-last-integer (each-integer) bit? * + fp-bitwise= - fp-qnan? / power-of-2? >= bitand find-integer complex < log2 > integer? real number bits>double double>bits bitor 2/ zero? rem fp-nan-payload all-integers? (find-integer) real-part prev-float align bits>float float? shift float 1+ 1- fp-nan? abs bitxor ratio? even? <= /mod odd? >integer ratio rational? bitnot real? >fixnum complex? /i numerator /f syn keyword factorKeyword append assert-sequence= find-last-from trim-head-slice clone-like 3sequence assert-sequence? map-as filter-here last-index-from prepare-index reversed index-from cut* pad-tail (indices) concat-as remq but-last snip trim-tail nths nth 2pusher sequence slice? partition remove-nth tail-slice empty? tail* if-empty find-from virtual-sequence? member? set-length delq drop-prefix unclip iota unclip-last-slice bounds-error? sequence-hashcode-step map start midpoint@ rest-slice prepend fourth sift delete sigma new-sequence follow like delete-nth first4 1sequence reverse slice unless-empty padding virtual@ repetition? index 4sequence max-length set-second immutable-sequence first2 first3 replicate-as reduce-index unclip-slice supremum insert-nth trim-tail-slice tail 3append short count suffix concat flip filter sum immutable? 2sequence delete-all start* indices snip-slice check-slice sequence? head map-find reduce append-as reverse-here sequence= halves collapse-slice interleave 2map binary-reduce virtual-seq slice-error? product bounds-check? bounds-check harvest immutable find produce remove pad-head replicate set-fourth peek shorten reversed? map-find-last 3map-as 2unclip-slice shorter? 3map find-last head-slice pop* 2map-as tail-slice* but-last-slice 2map-reduce iota? accumulate each pusher cut-slice new-resizable each-index head-slice* 2reverse-each sequence-hashcode memq? pop set-nth ?nth second change-each join when-empty accumulator immutable-sequence? all? 3append-as virtual-sequence subseq? push-either new-like length last-index push-if 2all? lengthen assert-sequence copy map-reduce move third first 3each tail? set-first prefix bounds-error any? trim-slice exchange surround 2reduce cut change-nth min-length set-third produce-as push-all head? delete-slice rest sum-lengths 2each head* infimum glue slice-error subseq replace-slice push repetition map-index trim-head unclip-last mismatch trim