]> gitweb.factorcode.org Git - factor.git/commitdiff
move if-zero etc to math, remove 1-/1+ from math
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 14 Aug 2009 19:27:23 +0000 (14:27 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 14 Aug 2009 19:27:23 +0000 (14:27 -0500)
18 files changed:
basis/bootstrap/compiler/compiler.factor
basis/compiler/tests/optimizer.factor
basis/compiler/tree/cleanup/cleanup-tests.factor
basis/compiler/tree/propagation/inlining/inlining.factor
basis/compiler/tree/recursive/recursive-tests.factor
basis/db/postgresql/postgresql.factor
basis/formatting/formatting.factor
basis/math/bitwise/bitwise-tests.factor
basis/math/functions/functions-docs.factor
basis/math/intervals/intervals-tests.factor
basis/regexp/regexp.factor
basis/xmode/marker/marker.factor
core/math/math-docs.factor
core/math/math.factor
core/sequences/sequences-docs.factor
core/sequences/sequences.factor
extra/project-euler/055/055.factor
misc/vim/syntax/factor.vim

index d0f71474526622e14774c12940260ecd80e5f357..a539e456616639c958d13b0daf351a24f16c9377 100755 (executable)
@@ -74,7 +74,7 @@ nl
 "." write flush
 
 {
-    + 1+ 1- 2/ < <= > >= shift
+    + 2/ < <= > >= shift
 } compile-unoptimized
 
 "." write flush
index 9cd6cfaef2b6da4d371fd6d48b16eda905088285..186e2f8c31e79003251e5081a27c8a1882190f37 100644 (file)
@@ -67,7 +67,7 @@ TUPLE: pred-test ;
 [ 3 ] [ t bad-kill-2 ] unit-test
 
 ! regression
-: (the-test) ( x -- y ) dup 0 > [ 1- (the-test) ] when ; inline recursive
+: (the-test) ( x -- y ) dup 0 > [ 1 - (the-test) ] when ; inline recursive
 : the-test ( -- x y ) 2 dup (the-test) ;
 
 [ 2 0 ] [ the-test ] unit-test
index bc8a7b0765092a6139d122bb9d2b16eb33d6f94a..73ff49259a079d17a66d84b33ee5f9ae10029b5f 100755 (executable)
@@ -115,10 +115,6 @@ M: object xyz ;
     [ { fixnum } declare [ ] times ] \ >= inlined?
 ] unit-test
 
-[ t ] [
-    [ { fixnum } declare [ ] times ] \ 1+ inlined?
-] unit-test
-
 [ t ] [
     [ { fixnum } declare [ ] times ] \ + inlined?
 ] unit-test
@@ -172,19 +168,6 @@ M: object xyz ;
     [ { array-capacity } declare 1 fixnum- ] \ fixnum- inlined?
 ] unit-test
 
-[ t ] [
-    [ 5000 [ 5000 [ ] times ] times ] \ 1+ inlined?
-] unit-test
-
-[ t ] [
-    [ 5000 [ [ ] times ] each ] \ 1+ inlined?
-] unit-test
-
-[ t ] [
-    [ 5000 0 [ dup 2 - swap [ 2drop ] curry each ] reduce ]
-    \ 1+ inlined?
-] unit-test
-
 GENERIC: annotate-entry-test-1 ( x -- )
 
 M: fixnum annotate-entry-test-1 drop ;
@@ -193,7 +176,7 @@ M: fixnum annotate-entry-test-1 drop ;
     2dup >= [
         2drop
     ] [
-        [ dup annotate-entry-test-1 1+ ] dip (annotate-entry-test-2)
+        [ dup annotate-entry-test-1 1 + ] dip (annotate-entry-test-2)
     ] if ; inline recursive
 
 : annotate-entry-test-2 ( from to -- obj ) 0 -rot (annotate-entry-test-2) ; inline
@@ -305,10 +288,6 @@ cell-bits 32 = [
     ] \ + inlined?
 ] unit-test
 
-[ t ] [
-    [ 1000 iota [ 1+ ] map ] { 1+ fixnum+ } inlined?
-] unit-test
-
 : rec ( a -- b )
     dup 0 > [ 1 - rec ] when ; inline recursive
 
@@ -467,7 +446,7 @@ cell-bits 32 = [
 : buffalo-wings ( i seq -- )
     2dup < [
         2dup chicken-fingers
-        [ 1+ ] dip buffalo-wings
+        [ 1 + ] dip buffalo-wings
     ] [
         2drop
     ] if ; inline recursive
@@ -486,7 +465,7 @@ cell-bits 32 = [
 : ribs ( i seq -- )
     2dup < [
         steak
-        [ 1+ ] dip ribs
+        [ 1 + ] dip ribs
     ] [
         2drop
     ] if ; inline recursive
index 8f8c0773aaf6e71f473f90d5cd8b94875177afbd..1586f2ca0b98b911604d26a9c25d5cadc7ffd35a 100755 (executable)
@@ -146,7 +146,7 @@ DEFER: (flat-length)
 
 : body-length-bias ( word -- n )
     [ flat-length ] [ inlining-count get at 0 or ] bi
-    over 2 <= [ drop ] [ 2/ 1+ * ] if 24 swap [-] 4 /i ;
+    over 2 <= [ drop ] [ 2/ 1 + * ] if 24 swap [-] 4 /i ;
 
 : inlining-rank ( #call word -- n )
     [
index a1cbf15438e2d5ebe0e6ab80c76f166c2634614d..4c4220f238c5aee623ab57c42225138ecc64e685 100644 (file)
@@ -53,7 +53,7 @@ IN: compiler.tree.recursive.tests
 ] unit-test
 
 : loop-test-2 ( a b -- a' )
-    dup [ 1+ loop-test-2 1 - ] [ drop ] if ; inline recursive
+    dup [ 1 + loop-test-2 1 - ] [ drop ] if ; inline recursive
 
 [ t ] [
     [ loop-test-2 ] build-tree analyze-recursive
index 9e51f41ff1de63949fe0747084cb83d012aed090..e5e8097d3f54f4b4969db66a9f850fab51c9dbd5 100644 (file)
@@ -88,7 +88,7 @@ M: postgresql-statement query-results ( query -- result-set )
     dup init-result-set ;
 
 M: postgresql-result-set advance-row ( result-set -- )
-    [ 1+ ] change-n drop ;
+    [ 1 + ] change-n drop ;
 
 M: postgresql-result-set more-rows? ( result-set -- ? )
     [ n>> ] [ max>> ] bi < ;
index 1b1bc8c2afb5cce2ccab3a9ba5e44c1eaced9056..40279749d64368592d9c416fb47257dae0412aa9 100644 (file)
@@ -138,7 +138,7 @@ MACRO: printf ( format-string -- )
 
 : (week-of-year) ( timestamp day -- n )
     [ dup clone 1 >>month 1 >>day day-of-week dup ] dip > [ 7 swap - ] when
-    [ day-of-year ] dip 2dup < [ 0 2nip ] [ - 7 / 1+ >fixnum ] if ;
+    [ day-of-year ] dip 2dup < [ 0 2nip ] [ - 7 / 1 + >fixnum ] if ;
 
 : week-of-year-sunday ( timestamp -- n ) 0 (week-of-year) ; inline
 
index e10853af183482904fbf7a7a910fd8365aebeaf1..d1e6c11b6c900a84e2a73afd1f4620d3335156fa 100644 (file)
@@ -17,7 +17,8 @@ IN: math.bitwise.tests
 [ 256 ] [ 1 { 8 } bitfield ] unit-test
 [ 268 ] [ 3 1 { 8 2 } bitfield ] unit-test
 [ 268 ] [ 1 { 8 { 3 2 } } bitfield ] unit-test
-[ 512 ] [ 1 { { 1+ 8 } } bitfield ] unit-test
+: test-1+ ( x -- y ) 1 + ;
+[ 512 ] [ 1 { { test-1+ 8 } } bitfield ] unit-test
 
 CONSTANT: a 1
 CONSTANT: b 2
index 0fe77fa4aeba1fd0c35e24a83dccc32f7af1b7aa..114b92ecdeb9c3bdf36de1c0f6183ae3b213d41e 100644 (file)
@@ -20,9 +20,6 @@ ARTICLE: "arithmetic-functions" "Arithmetic functions"
 "Computing additive and multiplicative inverses:"
 { $subsection neg }
 { $subsection recip }
-"Incrementing, decrementing:"
-{ $subsection 1+ }
-{ $subsection 1- }
 "Minimum, maximum, clamping:"
 { $subsection min }
 { $subsection max }
@@ -32,6 +29,10 @@ ARTICLE: "arithmetic-functions" "Arithmetic functions"
 "Tests:"
 { $subsection zero? }
 { $subsection between? }
+"Control flow:"
+{ $subsection if-zero }
+{ $subsection when-zero }
+{ $subsection unless-zero }
 "Sign:"
 { $subsection sgn }
 "Rounding:"
index de402b48b9256ddaa877c9e120dbedc8861ddaa9..07c3d8fae7d33aaea135d3bf585b4c3d9d1c9be0 100644 (file)
@@ -267,8 +267,6 @@ IN: math.intervals.tests
         { bitnot interval-bitnot }
         { abs interval-abs }
         { 2/ interval-2/ }
-        { 1+ interval-1+ }
-        { 1- interval-1- }
         { neg interval-neg }
     }
     "math.ratios.private" vocab [
index 4318986813d5eeaf3b9eca90b163112e823ac0cd..ba4aa47e7b87f7dcd26ff157cc5b86d4ff25501c 100644 (file)
@@ -38,7 +38,7 @@ M: lookbehind question>quot ! Returns ( index string -- ? )
 
 GENERIC: end/start ( string regexp -- end start )
 M: regexp end/start drop length 0 ;
-M: reverse-regexp end/start drop length 1- -1 swap ;
+M: reverse-regexp end/start drop length 1 - -1 swap ;
 
 PRIVATE>
 
index febfc2b40f6a189a38c8b19251ce62025a1c3ded..d3a4f1e9a22a17c99af1bc999e4a4a159a53bdac 100755 (executable)
@@ -257,7 +257,7 @@ M: mark-previous-rule handle-rule-start
         drop
 
         seen-whitespace-end? get [
-            position get 1+ whitespace-end set
+            position get 1 + whitespace-end set
         ] unless
 
         (check-word-break)
index c4a1bb4f345af8a2df942edba4148896fccfe64e..853aca5969d3516b6a0207dfd4bf2999833091ac 100644 (file)
@@ -151,7 +151,7 @@ HELP: bitnot
 { $description "Computes the bitwise complement of the input; that is, each bit in the input number is flipped." }
 { $notes "This word implements bitwise not, so applying it to booleans will throw an error. Boolean not is the " { $link not } " word."
 $nl
-"Due to the two's complement representation of signed integers, the following two lines are equivalent:" { $code "bitnot" "neg 1-" } } ;
+"Due to the two's complement representation of signed integers, the following two lines are equivalent:" { $code "bitnot" "neg 1 -" } } ;
 
 HELP: bit?
 { $values { "x" integer } { "n" integer } { "?" "a boolean" } }
@@ -163,22 +163,6 @@ HELP: log2
 { $description "Outputs the largest integer " { $snippet "n" } " such that " { $snippet "2^n" } " is less than or equal to " { $snippet "x" } "." }
 { $errors "Throws an error if " { $snippet "x" } " is zero or negative." } ;
 
-HELP: 1+
-{ $values { "x" number } { "y" number } }
-{ $description
-    "Increments a number by 1. The following two lines are equivalent:"
-    { $code "1+" "1 +" }
-    "There is no difference in behavior or efficiency."
-} ;
-
-HELP: 1-
-{ $values { "x" number } { "y" number } }
-{ $description
-    "Decrements a number by 1. The following two lines are equivalent:"
-    { $code "1-" "1 -" }
-    "There is no difference in behavior or efficiency."
-} ;
-
 HELP: ?1+
 { $values { "x" { $maybe number } } { "y" number } }
 { $description "If the input is not " { $link f } ", adds one. Otherwise, outputs a " { $snippet "0" } "." } ;
@@ -237,6 +221,49 @@ HELP: zero?
 { $values { "x" number } { "?" "a boolean" } }
 { $description "Tests if the number is equal to zero." } ;
 
+HELP: if-zero
+{ $values { "n" number } { "quot1" quotation } { "quot2" quotation } }
+{ $description "Makes an implicit check if the number is zero. A zero is dropped and " { $snippet "quot1" } " is called. Otherwise, if the number is not zero, " { $snippet "quot2" } " is called on it." }
+{ $example
+    "USING: kernel math prettyprint sequences ;"
+    "3 [ \"zero\" ] [ sq ] if-zero ."
+    "9"
+} ;
+
+HELP: when-zero
+{ $values
+     { "n" number } { "quot" "the first quotation of an " { $link if-zero } } }
+{ $description "Makes an implicit check if the sequence is empty. A zero is dropped and the " { $snippet "quot" } " is called." }
+{ $examples "This word is equivalent to " { $link if-zero } " with an empty second quotation:"
+    { $example
+    "USING: math prettyprint ;"
+    "0 [ 4 ] [ ] if-zero ."
+    "4"
+    }
+    { $example
+    "USING: math prettyprint ;"
+    "0 [ 4 ] when-zero ."
+    "4"
+    }
+} ;
+
+HELP: unless-zero
+{ $values
+     { "n" number } { "quot" "the second quotation of an " { $link if-empty } } }
+{ $description "Makes an implicit check if the number is zero. A zero is dropped. Otherwise, the " { $snippet "quot" } " is called on the number." }
+{ $examples "This word is equivalent to " { $link if-zero } " with an empty first quotation:"
+    { $example
+    "USING: sequences math prettyprint ;"
+    "3 [ ] [ sq ] if-empty ."
+    "9"
+    }
+    { $example
+    "USING: sequences math prettyprint ;"
+    "3 [ sq ] unless-zero ."
+    "9"
+    }
+} ;
+
 HELP: times
 { $values { "n" integer } { "quot" quotation } }
 { $description "Calls the quotation " { $snippet "n" } " times." }
index 8fa56e6e2496942287d2f0f9faf6781aaf81626d..a00f2240e1297daf0a82bededdf3ddf6b514da84 100755 (executable)
@@ -58,8 +58,6 @@ ERROR: log2-expects-positive x ;
     ] if ; inline
 
 : zero? ( x -- ? ) 0 number= ; inline
-: 1+ ( x -- y ) 1 + ; inline
-: 1- ( x -- y ) 1 - ; inline
 : 2/ ( x -- y ) -1 shift ; inline
 : sq ( x -- y ) dup * ; inline
 : neg ( x -- -x ) -1 * ; inline
@@ -71,6 +69,13 @@ ERROR: log2-expects-positive x ;
 : even? ( n -- ? ) 1 bitand zero? ;
 : odd? ( n -- ? ) 1 bitand 1 number= ;
 
+: if-zero ( n quot1 quot2 -- )
+    [ dup zero? ] [ [ drop ] prepose ] [ ] tri* if ; inline
+
+: when-zero ( n quot -- ) [ ] if-zero ; inline
+
+: unless-zero ( n quot -- ) [ ] swap if-zero ; inline
+
 UNION: integer fixnum bignum ;
 
 TUPLE: ratio { numerator integer read-only } { denominator integer read-only } ;
index fbdd8268dac6048adcd67486318a82865972c346..2a52384180d39e16c45d6b8c963c89665917751c 100755 (executable)
@@ -123,49 +123,6 @@ HELP: unless-empty
     }
 } ;
 
-HELP: if-zero
-{ $values { "n" number } { "quot1" quotation } { "quot2" quotation } }
-{ $description "Makes an implicit check if the number is zero. A zero is dropped and " { $snippet "quot1" } " is called. Otherwise, if the number is not zero, " { $snippet "quot2" } " is called on it." }
-{ $example
-    "USING: kernel math prettyprint sequences ;"
-    "3 [ \"zero\" ] [ sq ] if-zero ."
-    "9"
-} ;
-
-HELP: when-zero
-{ $values
-     { "n" number } { "quot" "the first quotation of an " { $link if-zero } } }
-{ $description "Makes an implicit check if the sequence is empty. A zero is dropped and the " { $snippet "quot" } " is called." }
-{ $examples "This word is equivalent to " { $link if-zero } " with an empty second quotation:"
-    { $example
-    "USING: sequences prettyprint ;"
-    "0 [ 4 ] [ ] if-zero ."
-    "4"
-    }
-    { $example
-    "USING: sequences prettyprint ;"
-    "0 [ 4 ] when-zero ."
-    "4"
-    }
-} ;
-
-HELP: unless-zero
-{ $values
-     { "n" number } { "quot" "the second quotation of an " { $link if-empty } } }
-{ $description "Makes an implicit check if the number is zero. A zero is dropped. Otherwise, the " { $snippet "quot" } " is called on the number." }
-{ $examples "This word is equivalent to " { $link if-zero } " with an empty first quotation:"
-    { $example
-    "USING: sequences math prettyprint ;"
-    "3 [ ] [ sq ] if-empty ."
-    "9"
-    }
-    { $example
-    "USING: sequences math prettyprint ;"
-    "3 [ sq ] unless-zero ."
-    "9"
-    }
-} ;
-
 HELP: delete-all
 { $values { "seq" "a resizable sequence" } }
 { $description "Resizes the sequence to zero length, removing all elements. Not all sequences are resizable." }
@@ -1440,11 +1397,7 @@ $nl
 "Checking if a sequence is empty:"
 { $subsection if-empty }
 { $subsection when-empty }
-{ $subsection unless-empty }
-"Checking if a number is zero:"
-{ $subsection if-zero }
-{ $subsection when-zero }
-{ $subsection unless-zero } ;
+{ $subsection unless-empty } ;
 
 ARTICLE: "sequences-access" "Accessing sequence elements"
 { $subsection ?nth }
index aecc9e33d8fd9f0e771921d2d6cf2c25d5f9cb88..84b80794a30ec2c4eda2b4596c4d3e8a0e6426ab 100755 (executable)
@@ -29,27 +29,13 @@ M: sequence shorten 2dup length < [ set-length ] [ 2drop ] if ;
 
 : empty? ( seq -- ? ) length 0 = ; inline
 
-<PRIVATE
-
-: (if-empty) ( seq quot1 quot2 quot3 -- )
-    [ [ drop ] prepose ] [ ] tri* if ; inline
-
-PRIVATE>
-
 : if-empty ( seq quot1 quot2 -- )
-    [ dup empty? ] (if-empty) ; inline
+    [ dup empty? ] [ [ drop ] prepose ] [ ] tri* if ; inline
 
 : when-empty ( seq quot -- ) [ ] if-empty ; inline
 
 : unless-empty ( seq quot -- ) [ ] swap if-empty ; inline
 
-: if-zero ( n quot1 quot2 -- )
-    [ dup zero? ] (if-empty) ; inline
-
-: when-zero ( n quot -- ) [ ] if-zero ; inline
-
-: unless-zero ( n quot -- ) [ ] swap if-zero ; inline
-
 : delete-all ( seq -- ) 0 swap set-length ;
 
 : first ( seq -- first ) 0 swap nth ; inline
index 07525fe6a49fdfaee5940b219b2ecbc060af2907..09663d241fea5b13a467e0f72fd304faa96d9e7f 100644 (file)
@@ -50,7 +50,7 @@ IN: project-euler.055
 : (lychrel?) ( n iteration -- ? )
     dup 50 < [
         [ add-reverse ] dip over palindrome?
-        [ 2drop f ] [ 1+ (lychrel?) ] if
+        [ 2drop f ] [ 1 + (lychrel?) ] if
     ] [
         2drop t
     ] if ;
index 1d89c1c10e15f0aea9cca93ed8b2dcc84f0042d2..00b4a4e9f7cefdb465cb46b9081fb6cad6539a26 100644 (file)
@@ -50,7 +50,7 @@ syn keyword factorCompileDirective inline foldable recursive
 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 assoc-refine 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 maybe-set-at substitute assoc-filter 2cache delete-at assoc-find keys assoc-any? unzip
 syn keyword factorKeyword case execute-effect no-cond no-case? 3cleave>quot 2cleave cond>quot wrong-values? no-cond? cleave>quot no-case case>quot 3cleave wrong-values to-fixed-point alist>quot case-find cond cleave 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 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 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 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? set-last 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 map-integers 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 last replicate set-fourth 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
 syn keyword factorKeyword global +@ change set-namestack change-global init-namespaces on off set-global namespace set with-scope bind with-variable inc dec counter initialize namestack get get-global make-assoc
 syn keyword factorKeyword <array> 2array 3array pair >array 1array 4array pair? array resize-array array?