]> gitweb.factorcode.org Git - factor.git/commitdiff
remove at-default. it was hardly used and it's just '?at drop'
authorDoug Coleman <erg@jobim.local>
Mon, 25 May 2009 02:46:59 +0000 (21:46 -0500)
committerDoug Coleman <erg@jobim.local>
Mon, 25 May 2009 02:46:59 +0000 (21:46 -0500)
basis/core-text/fonts/fonts.factor
basis/unicode/data/data.factor
basis/windows/fonts/fonts.factor
core/assocs/assocs-docs.factor
core/assocs/assocs-tests.factor
core/assocs/assocs.factor
misc/vim/syntax/factor.vim

index 4525509d4481e622b0457e92a070b9f058bad07b..2656811c1fc92eec8faa5aca9b3d5a9f90c19199 100644 (file)
@@ -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
 
index 318a56627bbd0e4ef90e9062b3673efd133a274e..1c6c6afdf35711473774469afc0cc9e116e0a907 100644 (file)
@@ -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
index 1753ff1ce1f13f656573b0a4ca385d9bfdeca95a..269e8f8f489297c0aa12d487c0cc21164f9acfc9 100755 (executable)
@@ -7,7 +7,7 @@ IN: windows.fonts
         { "sans-serif" "Tahoma" }\r
         { "serif" "Times New Roman" }\r
         { "monospace" "Courier New" }\r
-    } at-default ;\r
+    } ?at drop ;\r
     \r
 MEMO:: (cache-font) ( font -- HFONT )\r
     font size>> neg ! nHeight\r
index e56fedbd26ea63a1709a201d8cddb306b9483333..f971b8971bcf77582dd859590dedfcd3b1b69dfd 100755 (executable)
@@ -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 }
index fc74df6d452efc8458e55f4c75b282666cbf77d6..c473ac0dfa1747e16a629ce5b43db61641b6e53c 100644 (file)
@@ -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 ] }
index e783ef81c4d7d7328157b45ee762ffc9a24391be..d655b99c3045ca16bbea780c8050e4583bf0c14a 100755 (executable)
@@ -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 ;
index 86f4f191476cd3e3b70c38137e7ee59eb3141972..8da50017c85e693d75a3c29898b7015ee244f927 100755 (executable)
@@ -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 <wrapper> 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 <enum> 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 <enum> 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 <buckets> 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 <fp-nan> < 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? <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 <flat-slice> second change-each join when-empty accumulator immutable-sequence? <reversed> 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? <repetition> 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