From 7c92ab1ea56378f576bf357decce0c28c02f425d Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 14 Aug 2009 14:27:23 -0500 Subject: [PATCH] move if-zero etc to math, remove 1-/1+ from math --- basis/bootstrap/compiler/compiler.factor | 2 +- basis/compiler/tests/optimizer.factor | 2 +- .../tree/cleanup/cleanup-tests.factor | 27 +------- .../tree/propagation/inlining/inlining.factor | 2 +- .../tree/recursive/recursive-tests.factor | 2 +- basis/db/postgresql/postgresql.factor | 2 +- basis/formatting/formatting.factor | 2 +- basis/math/bitwise/bitwise-tests.factor | 3 +- basis/math/functions/functions-docs.factor | 7 ++- basis/math/intervals/intervals-tests.factor | 2 - basis/regexp/regexp.factor | 2 +- basis/xmode/marker/marker.factor | 2 +- core/math/math-docs.factor | 61 +++++++++++++------ core/math/math.factor | 9 ++- core/sequences/sequences-docs.factor | 49 +-------------- core/sequences/sequences.factor | 16 +---- extra/project-euler/055/055.factor | 2 +- misc/vim/syntax/factor.vim | 2 +- 18 files changed, 72 insertions(+), 122 deletions(-) diff --git a/basis/bootstrap/compiler/compiler.factor b/basis/bootstrap/compiler/compiler.factor index d0f7147452..a539e45661 100755 --- a/basis/bootstrap/compiler/compiler.factor +++ b/basis/bootstrap/compiler/compiler.factor @@ -74,7 +74,7 @@ nl "." write flush { - + 1+ 1- 2/ < <= > >= shift + + 2/ < <= > >= shift } compile-unoptimized "." write flush diff --git a/basis/compiler/tests/optimizer.factor b/basis/compiler/tests/optimizer.factor index 9cd6cfaef2..186e2f8c31 100644 --- a/basis/compiler/tests/optimizer.factor +++ b/basis/compiler/tests/optimizer.factor @@ -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 diff --git a/basis/compiler/tree/cleanup/cleanup-tests.factor b/basis/compiler/tree/cleanup/cleanup-tests.factor index bc8a7b0765..73ff49259a 100755 --- a/basis/compiler/tree/cleanup/cleanup-tests.factor +++ b/basis/compiler/tree/cleanup/cleanup-tests.factor @@ -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 diff --git a/basis/compiler/tree/propagation/inlining/inlining.factor b/basis/compiler/tree/propagation/inlining/inlining.factor index 8f8c0773aa..1586f2ca0b 100755 --- a/basis/compiler/tree/propagation/inlining/inlining.factor +++ b/basis/compiler/tree/propagation/inlining/inlining.factor @@ -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 ) [ diff --git a/basis/compiler/tree/recursive/recursive-tests.factor b/basis/compiler/tree/recursive/recursive-tests.factor index a1cbf15438..4c4220f238 100644 --- a/basis/compiler/tree/recursive/recursive-tests.factor +++ b/basis/compiler/tree/recursive/recursive-tests.factor @@ -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 diff --git a/basis/db/postgresql/postgresql.factor b/basis/db/postgresql/postgresql.factor index 9e51f41ff1..e5e8097d3f 100644 --- a/basis/db/postgresql/postgresql.factor +++ b/basis/db/postgresql/postgresql.factor @@ -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 < ; diff --git a/basis/formatting/formatting.factor b/basis/formatting/formatting.factor index 1b1bc8c2af..40279749d6 100644 --- a/basis/formatting/formatting.factor +++ b/basis/formatting/formatting.factor @@ -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 diff --git a/basis/math/bitwise/bitwise-tests.factor b/basis/math/bitwise/bitwise-tests.factor index e10853af18..d1e6c11b6c 100644 --- a/basis/math/bitwise/bitwise-tests.factor +++ b/basis/math/bitwise/bitwise-tests.factor @@ -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 diff --git a/basis/math/functions/functions-docs.factor b/basis/math/functions/functions-docs.factor index 0fe77fa4ae..114b92ecde 100644 --- a/basis/math/functions/functions-docs.factor +++ b/basis/math/functions/functions-docs.factor @@ -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:" diff --git a/basis/math/intervals/intervals-tests.factor b/basis/math/intervals/intervals-tests.factor index de402b48b9..07c3d8fae7 100644 --- a/basis/math/intervals/intervals-tests.factor +++ b/basis/math/intervals/intervals-tests.factor @@ -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 [ diff --git a/basis/regexp/regexp.factor b/basis/regexp/regexp.factor index 4318986813..ba4aa47e7b 100644 --- a/basis/regexp/regexp.factor +++ b/basis/regexp/regexp.factor @@ -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> diff --git a/basis/xmode/marker/marker.factor b/basis/xmode/marker/marker.factor index febfc2b40f..d3a4f1e9a2 100755 --- a/basis/xmode/marker/marker.factor +++ b/basis/xmode/marker/marker.factor @@ -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) diff --git a/core/math/math-docs.factor b/core/math/math-docs.factor index c4a1bb4f34..853aca5969 100644 --- a/core/math/math-docs.factor +++ b/core/math/math-docs.factor @@ -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." } diff --git a/core/math/math.factor b/core/math/math.factor index 8fa56e6e24..a00f2240e1 100755 --- a/core/math/math.factor +++ b/core/math/math.factor @@ -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 } ; diff --git a/core/sequences/sequences-docs.factor b/core/sequences/sequences-docs.factor index fbdd8268da..2a52384180 100755 --- a/core/sequences/sequences-docs.factor +++ b/core/sequences/sequences-docs.factor @@ -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 } diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index aecc9e33d8..84b80794a3 100755 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -29,27 +29,13 @@ M: sequence shorten 2dup length < [ set-length ] [ 2drop ] if ; : empty? ( seq -- ? ) length 0 = ; inline - - : 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 diff --git a/extra/project-euler/055/055.factor b/extra/project-euler/055/055.factor index 07525fe6a4..09663d241f 100644 --- a/extra/project-euler/055/055.factor +++ b/extra/project-euler/055/055.factor @@ -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 ; diff --git a/misc/vim/syntax/factor.vim b/misc/vim/syntax/factor.vim index 1d89c1c10e..00b4a4e9f7 100644 --- a/misc/vim/syntax/factor.vim +++ b/misc/vim/syntax/factor.vim @@ -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 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 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 < 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 < 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? 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 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 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 2array 3array pair >array 1array 4array pair? array resize-array array? -- 2.34.1