]> gitweb.factorcode.org Git - factor.git/commitdiff
kernel: ?if-old is just `[ or* ] 2dip if`
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 24 Feb 2023 01:41:05 +0000 (19:41 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 26 Feb 2023 23:11:04 +0000 (17:11 -0600)
32 files changed:
basis/cocoa/pasteboard/pasteboard.factor
basis/compiler/tree/propagation/simple/simple.factor
basis/cpu/ppc/ppc.factor
basis/cpu/x86/x86.factor
basis/html/templates/chloe/syntax/syntax.factor
basis/match/match.factor
basis/persistent/vectors/vectors.factor
basis/ui/backend/cocoa/views/views.factor
basis/ui/gadgets/gadgets.factor
basis/ui/pixel-formats/pixel-formats.factor
basis/ui/tools/listener/listener.factor
basis/unicode/data/data.factor
basis/unicode/normalize/normalize.factor
basis/vocabs/generated/generated.factor
basis/vocabs/metadata/metadata.factor
basis/xmode/marker/state/state.factor
core/combinators/combinators-docs.factor
core/continuations/continuations.factor
core/generic/math/math.factor
core/generic/single/single.factor
core/kernel/kernel-docs.factor
core/kernel/kernel-tests.factor
core/kernel/kernel.factor
core/parser/parser.factor
core/vocabs/parser/parser.factor
extra/gml/runtime/runtime.factor
extra/math/matrices/elimination/elimination.factor
extra/multi-methods/multi-methods.factor
extra/pairs/pairs.factor
extra/reports/noise/noise.factor
extra/rosetta-code/probabilistic-choice/probabilistic-choice.factor
misc/vim/syntax/factor/generated.vim

index d14ed6aa84b0f12f752bdbd10406d0fed0c3f04e..752029872e6cb0e41f8a911638d7efbcca95e124 100644 (file)
@@ -28,7 +28,7 @@ CONSTANT: NSStringPboardType "NSStringPboardType"
 
 : ?pasteboard-string ( pboard error -- str/f )
     over pasteboard-string? [
-        swap pasteboard-string [ ] [ pasteboard-error ] ?if-old
+        swap pasteboard-string or* [ pasteboard-error ] unless
     ] [
         nip pasteboard-error
     ] if ;
index 7209408d3c07d92d59e01b0f4fdd0cbd6eddee8a..27219188c75a5640364121dc56a0993e36a47b0d 100644 (file)
@@ -102,8 +102,8 @@ ERROR: invalid-outputs #call infos ;
     [ predicate-output-infos 1array ] 2bi ;
 
 : default-output-value-infos ( #call word -- infos )
-    "default-output-classes" word-prop
-    [ class-infos ] [ out-d>> length object-info <repetition> ] ?if-old ;
+    "default-output-classes" word-prop or*
+    [ class-infos ] [ out-d>> length object-info <repetition> ] if ;
 
 : output-value-infos ( #call word -- infos )
     {
index 7a5e3a3ad6042229b7aa07557ce0c5ad16a3517a..81a549118a249a025d8509d4ff040516dc543ff5 100644 (file)
@@ -701,7 +701,7 @@ M:: ppc.64 %convert-integer ( dst src c-type -- )
     } case ;
 
 M: ppc.32 %load-memory-imm
-    [
+    or* [
         pick %trap-null
         {
             { c:char   [ [ dup ] 2dip LBZ dup EXTSB ] }
@@ -717,10 +717,10 @@ M: ppc.32 %load-memory-imm
             { float-rep  [ LFS ] }
             { double-rep [ LFD ] }
         } case
-    ] ?if-old ;
+    ] if ;
 
 M: ppc.64 %load-memory-imm
-    [
+    or* [
         pick %trap-null
         {
             { c:char      [ [ dup ] 2dip LBZ dup EXTSB ] }
@@ -738,12 +738,12 @@ M: ppc.64 %load-memory-imm
             { float-rep  [ [ scratch-reg ] dip LI scratch-reg LFSX ] }
             { double-rep [ [ scratch-reg ] dip LI scratch-reg LFDX ] }
         } case
-    ] ?if-old ;
+    ] if ;
 
 
 M: ppc.32 %load-memory
     [ [ 0 assert= ] bi@ ] 2dip
-    [
+    or* [
         pick %trap-null
         {
             { c:char   [ [ LBZX ] [ drop dup EXTSB ] 2bi ] }
@@ -759,11 +759,11 @@ M: ppc.32 %load-memory
             { float-rep  [ LFSX ] }
             { double-rep [ LFDX ] }
         } case
-    ] ?if-old ;
+    ] if ;
 
 M: ppc.64 %load-memory
     [ [ 0 assert= ] bi@ ] 2dip
-    [
+    or* [
         pick %trap-null
         {
             { c:char      [ [ LBZX ] [ drop dup EXTSB ] 2bi ] }
@@ -781,11 +781,11 @@ M: ppc.64 %load-memory
             { float-rep  [ LFSX ] }
             { double-rep [ LFDX ] }
         } case
-    ] ?if-old ;
+    ] if ;
 
 
 M: ppc.32 %store-memory-imm
-    [
+    or* [
         {
             { c:char   [ STB ] }
             { c:uchar  [ STB ] }
@@ -800,10 +800,10 @@ M: ppc.32 %store-memory-imm
             { float-rep  [ STFS ] }
             { double-rep [ STFD ] }
         } case
-    ] ?if-old ;
+    ] if ;
 
 M: ppc.64 %store-memory-imm
-    [
+    or* [
         {
             { c:char      [ STB ] }
             { c:uchar     [ STB ] }
@@ -820,11 +820,11 @@ M: ppc.64 %store-memory-imm
             { float-rep  [ [ scratch-reg ] dip LI scratch-reg STFSX ] }
             { double-rep [ [ scratch-reg ] dip LI scratch-reg STFDX ] }
         } case
-    ] ?if-old ;
+    ] if ;
 
 M: ppc.32 %store-memory
     [ [ 0 assert= ] bi@ ] 2dip
-    [
+    or* [
         {
             { c:char   [ STBX ] }
             { c:uchar  [ STBX ] }
@@ -839,11 +839,11 @@ M: ppc.32 %store-memory
             { float-rep  [ STFSX ] }
             { double-rep [ STFDX ] }
         } case
-    ] ?if-old ;
+    ] if ;
 
 M: ppc.64 %store-memory
     [ [ 0 assert= ] bi@ ] 2dip
-    [
+    or* [
         {
             { c:char      [ STBX ] }
             { c:uchar     [ STBX ] }
@@ -860,7 +860,7 @@ M: ppc.64 %store-memory
             { float-rep  [ STFSX ] }
             { double-rep [ STFDX ] }
         } case
-    ] ?if-old ;
+    ] if ;
 
 M:: ppc %allot ( dst size class nursery-ptr -- )
     ! dst = vm->nursery.here;
index 431a6156e9504fc48c83220e960667f31866cd55..e5837712738cd35fc44ecf19d9b59c94ffa15520 100644 (file)
@@ -400,7 +400,7 @@ M: x86 %convert-integer
     [ [ drop 1array ] [ [+] ] 2bi ] 2dip ;
 
 : (%load-memory) ( dst exclude address rep c-type -- )
-    [
+    or* [
         {
             { c:char   [ 8 %alien-signed-getter ] }
             { c:uchar  [ 8 %alien-unsigned-getter ] }
@@ -409,7 +409,7 @@ M: x86 %convert-integer
             { c:int    [ 32 %alien-signed-getter ] }
             { c:uint   [ 32 [ 2drop ] %alien-integer-getter ] }
         } case
-    ] [ nipd %copy ] ?if-old ;
+    ] [ nipd %copy ] if ;
 
 M: x86 %load-memory
     (%memory) (%load-memory) ;
@@ -418,7 +418,7 @@ M: x86 %load-memory-imm
     (%memory-imm) (%load-memory) ;
 
 : (%store-memory) ( src exclude address rep c-type -- )
-    [
+    or* [
         {
             { c:char   [ 8 %alien-integer-setter ] }
             { c:uchar  [ 8 %alien-integer-setter ] }
@@ -427,7 +427,7 @@ M: x86 %load-memory-imm
             { c:int    [ 32 %alien-integer-setter ] }
             { c:uint   [ 32 %alien-integer-setter ] }
         } case
-    ] [ [ nip swap ] dip %copy ] ?if-old ;
+    ] [ [ nip swap ] dip %copy ] if ;
 
 M: x86 %store-memory
     (%memory) (%store-memory) ;
index d0e49d581a3e8ddb3c000e5d52bf8306cef7bc8f..1a48e839a875946850a06a9f7aad7354a1eca133 100644 (file)
@@ -21,8 +21,8 @@ CONSTANT: chloe-ns "http://factorcode.org/chloe/1.0"
 XML-NS: chloe-name http://factorcode.org/chloe/1.0
 
 : required-attr ( tag name -- value )
-    [ nip ] [ chloe-name attr ] 2bi
-    [ ] [ " attribute is required" append throw ] ?if-old ;
+    [ nip ] [ chloe-name attr ] 2bi or*
+    [ " attribute is required" append throw ] unless ;
 
 : optional-attr ( tag name -- value )
     chloe-name attr ;
index 8fcb303851d7bb33c3c45faa5c33d154965968fc..d10b73701786c908b23fef8d16cf970e33b9dab2 100644 (file)
@@ -55,7 +55,7 @@ MACRO: match-cond ( assoc -- quot )
         first2
         [ [ dupd match ] curry ] dip
         [ with-variables ] curry rot
-        [ ?if-old ] 2curry append
+        [ [ or* ] 2dip if ] 2curry append
     ] reduce ;
 
 GENERIC: replace-patterns ( object -- result )
@@ -75,8 +75,8 @@ M: tuple replace-patterns tuple>array replace-patterns >tuple ;
     2dup shorter? [
         2drop f f
     ] [
-        2dup length head over match
-        [ swap ?rest ] [ [ rest ] dip (match-first) ] ?if-old
+        2dup length head over match or*
+        [ swap ?rest ] [ [ rest ] dip (match-first) ] if
     ] if ;
 
 : match-first ( seq pattern-seq -- bindings )
index 7215d03af3fc375a021476ae8b32c6cd914fab13..2316230cfb7b3a8eacb06f7215c6a89e00aeeca7 100644 (file)
@@ -73,7 +73,7 @@ M: persistent-vector nth-unsafe
         new-child
     ] [
         [ nip ] 2keep children>> last (ppush-new-tail)
-        [ swap new-child ] [ swap node-set-last f ] ?if-old
+        or* [ swap new-child ] [ swap node-set-last f ] if
     ] if ;
 
 : do-expansion ( pvec root expansion/f -- pvec )
index 9cb48c22ecd87065a22a7c648cbb155eec7ffbcd..2a981f26b642e8f7507795e395da225c3b0f883a 100644 (file)
@@ -76,8 +76,8 @@ CONSTANT: key-codes
     }
 
 : key-code ( event -- string ? )
-    dup -> keyCode key-codes at
-    [ t ] [ -> charactersIgnoringModifiers CF>string f ] ?if-old ;
+    dup -> keyCode key-codes at or*
+    [ t ] [ -> charactersIgnoringModifiers CF>string f ] if ;
 
 : event-modifiers ( event -- modifiers )
     -> modifierFlags modifiers modifier ;
index 6259ff6a6ef4ea75eff5f420d190aaf4a45f3f40..28bcf8b20a6194726ed798e2d721c6faf469fbcb 100644 (file)
@@ -87,7 +87,7 @@ M: gadget contains-point?
 : pick-up ( point gadget -- child/f )
     2dup [ dup point>rect ] dip children-on
     [ contains-point? ] with find-last nip
-    [ [ loc>> v- ] [ pick-up ] bi ] [ nip ] ?if-old ;
+    or* [ [ loc>> v- ] [ pick-up ] bi ] [ nip ] if ;
 
 : max-dims ( seq -- dim )
     [ 0 0 ] dip [ first2 swapd [ max ] 2bi@ ] each 2array ;
index 954828094b5d97b8635bd7b424d594c14be6aa1d..e687886b007e50ae4ab30cef08576ea880d0b6c6 100644 (file)
@@ -50,10 +50,10 @@ ERROR: invalid-pixel-format-attributes world attributes ;
 TUPLE: pixel-format < disposable world handle ;
 
 : <pixel-format> ( world attributes -- pixel-format )
-    2dup (make-pixel-format)
+    2dup (make-pixel-format) or*
     [ pixel-format new-disposable swap >>handle swap >>world ]
     [ invalid-pixel-format-attributes ]
-    ?if-old ;
+    if ;
 
 M: pixel-format dispose*
     [ (free-pixel-format) ] [ f >>handle drop ] bi ;
index c8bea074786d0298c0c4c0833d23b681b708f11a..ccab48c62fbdc9570143707c41c77c8881cd3f03 100644 (file)
@@ -365,7 +365,7 @@ M: object accept-completion-hook 2drop ;
 M: interactor stream-read-quot
     dup interactor-yield dup array? [
         over interactor-finish try-parse
-        [ ] [ stream-read-quot ] ?if-old
+        or* [ stream-read-quot ] unless
     ] [ nip ] if ;
 
 : interactor-operation ( gesture interactor -- ? )
index 07d94eaa3f21dc82845e4fadd63de2979546666d..451e2773e7e046855ac68ddc9adb6ca62683ab5e 100644 (file)
@@ -88,8 +88,8 @@ PRIVATE>
 
 : (chain-decomposed) ( hash value -- newvalue )
     [
-        2dup of
-        [ (chain-decomposed) ] [ 1array nip ] ?if-old
+        2dup of or*
+        [ (chain-decomposed) ] [ 1array nip ] if
     ] with map concat ;
 
 : chain-decomposed ( hash -- newhash )
index 233e2ae65815082929d7caccea0f1635f7c5bfa5..bb12f4c5102376f41c61a11602c87dd9db180567 100644 (file)
@@ -71,7 +71,7 @@ CONSTANT: final-count 28
     string [
         >fixnum dup ascii? [ out push ] [
             dup hangul? [ hangul>jamo out push-all ]
-            [ dup quot call [ out push-all ] [ out push ] ?if-old ] if
+            [ dup quot call or* [ out push-all ] [ out push ] if ] if
         ] if
     ] each
     out "" like dup reorder ; inline
index 8403f90fd66746f299147e5b85ae548bf91c55cd..0d1af5adbf0ea5a38aa9f8322a37c7c13de2dc00 100644 (file)
@@ -10,4 +10,4 @@ IN: vocabs.generated
                 [ _ with-current-vocab ] [ ] [ forget-vocab ] cleanup
             ] with-compilation-unit
         ] keep
-    ] ?if-old ; inline
+    ] [ or* ] 2dip if ; inline
index a02729238bff0118636fcb515f678191d9b6f4ba..169a9e82404ffa896d5a9297183c04a08a0aa9a2 100644 (file)
@@ -23,10 +23,10 @@ MEMO: vocab-file-lines ( vocab name -- lines/f )
     ] when ;
 
 : set-vocab-file-lines ( lines vocab name -- )
-    dupd vocab-file-path [
+    dupd vocab-file-path or* [
         swap [ ?delete-file ] [ swap utf8 set-file-lines ] if-empty
         \ vocab-file-lines reset-memoized
-    ] [ vocab-name no-vocab ] ?if-old ;
+    ] [ vocab-name no-vocab ] if ;
 
 : vocab-resources-path ( vocab -- path/f )
     "resources.txt" vocab-file-path ;
index 90b634e074de754b254401b7f5dc694bc6734a81..1bf2744681f5a417bafeefe9df9bfd2e3c9904a3 100644 (file)
@@ -38,8 +38,7 @@ SYMBOLS: line last-offset position context
     f >>in-rule context set ;
 
 : init-token-marker ( main prev-context line -- )
-    line set
-    [ ] [ f <line-context> ] ?if-old context set
+    line set or* [ f <line-context> ] unless context set
     0 position set
     0 last-offset set
     0 whitespace-end set
index de9cf9adbf5094bce4a1c8299507559a7c7c0489..404d31bb56cc37c49777bace18889388329cf48b 100644 (file)
@@ -170,7 +170,7 @@ ARTICLE: "conditionals" "Conditional combinators"
 "Forms abstracting a common stack shuffle pattern:"
 { $subsections if* when* unless* }
 "Another form abstracting a common stack shuffle pattern:"
-{ $subsections ?if-old }
+{ $subsections ?if }
 "Sometimes instead of branching, you just need to pick one of two values:"
 { $subsections ? }
 "Two combinators which abstract out nested chains of " { $link if } ":"
index 2df10575262b960bbd94049c3898d90f582e16ef..44ffe40849fef8fe2ca9a4c14024941a77e37b6c 100644 (file)
@@ -59,7 +59,7 @@ C: <continuation> continuation
 PRIVATE>
 
 : ifcc ( capture restore -- )
-    [ dummy-1 current-continuation ] 2dip [ dummy-2 ] prepose ?if-old ; inline
+    [ dummy-1 current-continuation or* ] 2dip [ dummy-2 ] prepose if ; inline
 
 : callcc0 ( quot -- ) [ drop ] ifcc ; inline
 
index ecb200b3507741e8856f75c62f1592f6d1fb4bcb..569a7133310cd653892bf843af2ad1113e75390e 100644 (file)
@@ -46,9 +46,9 @@ ERROR: no-math-method left right generic ;
 <PRIVATE
 
 : (math-method) ( generic class -- quot )
-    over ?lookup-method
+    over ?lookup-method or*
     [ 1quotation ]
-    [ default-math-method ] ?if-old ;
+    [ default-math-method ] if ;
 
 PRIVATE>
 
index 103394bc3964e246f61dd98553015c703d828463..c58e4eec54efe1149c16274546ec422b68fcf743 100644 (file)
@@ -77,7 +77,7 @@ C: <predicate-engine> predicate-engine
 
 : push-method ( method class atomic assoc -- )
     dupd [
-        [ ] [ H{ } clone <predicate-engine> ] ?if-old
+        or* [ H{ } clone <predicate-engine> ] unless
         [ methods>> set-at ] keep
     ] change-at ;
 
index 7fe2e3d81b007cf409b00dcdf5cf875890a6a893..923da3ac3ae4db05e127b872a4700f2bfe797c95 100644 (file)
@@ -716,15 +716,6 @@ HELP: unless*
 "The following two lines are equivalent:"
 { $code "X [ Y ] unless*" "X dup [ ] [ drop Y ] if" } } ;
 
-HELP: ?if-old
-{ $values { "obj" object } { "cond" "a generalized boolean" } { "true" { $quotation ( ..a cond -- ..b ) } } { "false" { $quotation ( ..a default -- ..b ) } } }
-{ $description "If the condition is " { $link f } ", the " { $snippet "false" } " quotation is called with the " { $snippet "default" } " value on the stack. Otherwise, the " { $snippet "true" } " quotation is called with the condition on the stack." }
-{ $notes
-"The following two lines are equivalent:"
-{ $code "[ X ] [ Y ] ?if" "dup [ nip X ] [ drop Y ] if" }
-"The following two lines are equivalent:"
-{ $code "[ ] [ ] ?if" "swap or" } } ;
-
 HELP: die
 { $description "Starts the front-end processor (FEP), which is a low-level debugger which can inspect memory addresses and the like. The FEP is also entered when a critical error occurs." }
 { $notes
index 2e048014ab203e6d2710fe6dbe42e8e7bc4e280b..e662317cfed25e3854cc79e86a98c8d7d95f7cbd 100644 (file)
@@ -113,8 +113,8 @@ IN: kernel.tests
 { 0 } [ f [ 0 ] unless* ] unit-test
 { t } [ t [ "Hello" ] unless* ] unit-test
 
-{ "2\n" } [ [ 1 2 [ . ] [ sq . ] ?if-old ] with-string-writer ] unit-test
-{ "9\n" } [ [ 3 f [ . ] [ sq . ] ?if-old ] with-string-writer ] unit-test
+{ "2\n" } [ [ 1 2 or* [ . ] [ sq . ] if ] with-string-writer ] unit-test
+{ "9\n" } [ [ 3 f or* [ . ] [ sq . ] if ] with-string-writer ] unit-test
 
 { f } [ f (clone) ] unit-test
 { -123 } [ -123 (clone) ] unit-test
index f749f8901bb809baf976a8f94a8ae620aea6b4c7..afe28621f92abe78e83b58e2ca64ecef44d17f9a 100644 (file)
@@ -112,9 +112,6 @@ DEFER: if
 
 ! Default
 
-: ?if-old ( ..a obj cond true: ( ..a cond -- ..b ) false: ( ..a default -- ..b ) -- ..b )
-    pick [ drop [ drop ] 2dip call ] [ 2nip call ] if ; inline
-
 : ?when ( ..a obj cond: ( ..a obj -- obj/f ) true: ( ..a cond -- ..b ) -- ..b )
     [ transmute* ] dip when ; inline
 
@@ -288,6 +285,8 @@ UNION: boolean POSTPONE: t POSTPONE: f ;
 
 : or ( obj1 obj2 -- ? ) dupd ? ; inline
 
+: or* ( obj1 obj2 -- obj2/obj1 second? ) [ nip t ] [ f ] if* ; inline
+
 : xor ( obj1 obj2 -- ? ) [ f swap ? ] when* ; inline
 
 : both? ( x y quot -- ? ) bi@ and ; inline
index e483e0c8d49fe861d57fae1f89ce90b804aebfa1..002a52bd5b50c62d35944d254946d036cd7f93d6 100644 (file)
@@ -34,7 +34,7 @@ SYMBOL: auto-use?
 : private? ( word -- ? ) vocabulary>> ".private" tail? ;
 
 : use-first-word? ( words -- ? )
-    [ length 1 = ] [ ?first dup [ private? not ] [ ] ?if-old ] bi and
+    [ length 1 = ] [ ?first dup or* [ private? not ] unless ] bi and
     auto-use? get and ;
 
 ! True branch is a singleton public word with no name conflicts
index 9d7f929180b8190c967beebe0c7fa71db322aca0..53b1447d24ec0617c8ee31010a5cd2cb8a9b66dc 100644 (file)
@@ -169,7 +169,7 @@ TUPLE: rename word vocab words ;
 : <rename> ( word vocab new-name -- rename )
     [
         2dup load-vocab words>> dupd at
-        [ ] [ swap no-word-in-vocab ] ?if-old
+        or* [ swap no-word-in-vocab ] unless
     ] dip associate rename boa ;
 
 : add-renamed-word ( word vocab new-name -- )
index 6803d110603bc048d4d7afb75a1ca2a5a0ad8837..374a96ee9171a9360481abe0f8bb48cdb0eee103 100644 (file)
@@ -59,7 +59,7 @@ ERROR: unbound-name { name gml-name } ;
 
 : lookup-name ( name gml -- value )
     dupd dictionary-stack>> assoc-stack
-    [ ] [ unbound-name ] ?if-old ; inline
+    or* [ unbound-name ] unless ; inline
 
 GENERIC: exec-proc ( registers gml proc -- registers gml )
 
index c41c82e5a6765ae50dcda46f4a1da7e6f11c98d0..7d3896e95d88bc850220bdf980bb2eeea833c33b 100644 (file)
@@ -21,7 +21,7 @@ SYMBOL: matrix
 : cols ( -- n ) 0 nth-row length ;
 
 : skip ( i seq quot -- n )
-    over [ find-from drop ] dip swap [ ] [ length ] ?if-old ; inline
+    over [ find-from drop ] dip swap or* [ length ] unless ; inline
 
 : first-col ( row# -- n )
     ! First non-zero column
index 34deb25240c0b74d3524ab6000d555a5b9c093cb..bd886ae27b9775724deca4408772f5db21e780ea 100644 (file)
@@ -254,7 +254,7 @@ PREDICATE: method-spec < array
     unclip generic? [ [ class? ] all? ] dip and ;
 
 syntax:M: method-spec where
-    dup unclip method [ ] [ first ] ?if-old where ;
+    dup unclip method or* [ first ] unless where ;
 
 syntax:M: method-spec set-where
     unclip method set-where ;
index c09be4d895906afaf80a1757889ee3fac02008b9..6c8e4c1dc16e7980ebd853c8022abeb547617980 100644 (file)
@@ -9,7 +9,7 @@ TUPLE: pair value key hash ;
     f pair boa ; inline
 
 : if-hash ( pair true-quot false-quot -- )
-    [ dup hash>> ] 2dip ?if-old ; inline
+    [ hash>> ] -rot ?if ; inline
 
 M: pair assoc-size
     [ assoc-size 1 + ] [ drop 1 ] if-hash ; inline
index 61155161386f2a23f248649f4ecc5ea9d80c3d53..9dccb37a3e0c07674dd68b8217899b415826c181 100644 (file)
@@ -35,7 +35,7 @@ IN: reports.noise
         { unless 1/4 }
         { when* 1/3 }
         { unless* 1/3 }
-        { ?if-old 1/2 }
+        { ?if 1/2 }
         { cond 1/2 }
         { case 1/2 }
         { keep 1 }
index bdc58c9865c39bcbd7a37836f920802f3d68a1af..990e82be6bcb845a3b5cdf80877ba6b24ffa3bf8 100644 (file)
@@ -41,7 +41,7 @@ MACRO: case-probas ( data -- quot )
     [ first2 [ 1quotation ] dip [ swap 2array ] when* ] map 1quotation ;
 
 : expected ( data name -- float )
-    dupd of [ ] [ values sift sum 1 swap - ] ?if-old ;
+    dupd of or* [ values sift sum 1 swap - ] unless ;
 
 : generate ( # case-probas -- seq )
     H{ } clone [
index 82e5e6b151c2eddb382a8080f3f34d2bccfded25..e73ada4c4b36310ebda1efde52e0d0b5219df00d 100644 (file)
@@ -34,7 +34,7 @@ SynKeywordFactorWord factorWord_io_encodings | syn keyword factorWord_io_encodin
 SynKeywordFactorWord factorWord_io_encodings_binary | syn keyword factorWord_io_encodings_binary contained binary binary?
 SynKeywordFactorWord factorWord_io_encodings_utf8 | syn keyword factorWord_io_encodings_utf8 contained >utf8-index code-point-length code-point-offsets utf8 utf8-index> utf8?
 SynKeywordFactorWord factorWord_io_files | syn keyword factorWord_io_files contained (file-appender) (file-reader) (file-writer) +input+ +output+ +retry+ <file-appender> <file-reader> <file-writer> change-file-contents change-file-lines drain file-contents file-exists? file-lines file-reader file-reader? file-writer file-writer? init-resource-path refill set-file-contents set-file-lines wait-for-fd with-file-appender with-file-reader with-file-writer
-SynKeywordFactorWord factorWord_kernel | syn keyword factorWord_kernel contained (clone) -roll -rot -rotd 2bi 2bi* 2bi@ 2curry 2dip 2drop 2dup 2keep 2keepd 2nip 2nipd 2over 2tri 2tri* 2tri@ 2with 3bi 3curry 3dip 3drop 3dup 3keep 3nip 3nipd 3tri 4dip 4drop 4dup 4keep 4nip 5drop 5nip <wrapper> = >boolean ? ?when ?unless ?if ?if-old and assert assert= assert? bi bi* bi-curry bi-curry* bi-curry@ bi@ boa boolean boolean? both? build call callstack callstack>array callstack? clear clone compose composed composed? curried curried? curry die dip do drop dup dupd either? eq? equal? execute get-callstack get-datastack get-retainstack hashcode hashcode* identity-hashcode identity-tuple identity-tuple? if if* keep keepd keepdd loop most negate new nip nipd not null object or over overd pick pickd prepose reach roll rot rotd same? spin swap swapd throw tri tri* tri-curry tri-curry* tri-curry@ tri@ tuck tuple tuple? unless unless* until when when* while while* with withd wrapper wrapper? xor
+SynKeywordFactorWord factorWord_kernel | syn keyword factorWord_kernel contained (clone) -roll -rot -rotd 2bi 2bi* 2bi@ 2curry 2dip 2drop 2dup 2keep 2keepd 2nip 2nipd 2over 2tri 2tri* 2tri@ 2with 3bi 3curry 3dip 3drop 3dup 3keep 3nip 3nipd 3tri 4dip 4drop 4dup 4keep 4nip 5drop 5nip <wrapper> = >boolean ? ?when ?unless ?if and assert assert= assert? bi bi* bi-curry bi-curry* bi-curry@ bi@ boa boolean boolean? both? build call callstack callstack>array callstack? clear clone compose composed composed? curried curried? curry die dip do drop dup dupd either? eq? equal? execute get-callstack get-datastack get-retainstack hashcode hashcode* identity-hashcode identity-tuple identity-tuple? if if* keep keepd keepdd loop most negate new nip nipd not null object or or* over overd pick pickd prepose reach roll rot rotd same? spin swap swapd throw tri tri* tri-curry tri-curry* tri-curry@ tri@ tuck tuple tuple? unless unless* until when when* while while* with withd wrapper wrapper? xor
 SynKeywordFactorWord factorWord_layouts | syn keyword factorWord_layouts contained (first-bignum) (fixnum-bits) (max-array-capacity) 32-bit? 64-bit? bootstrap-cell bootstrap-cell-bits bootstrap-cells bootstrap-first-bignum bootstrap-fixnum-bits bootstrap-max-array-capacity bootstrap-most-negative-fixnum bootstrap-most-positive-fixnum cell cell-bits cells data-alignment first-bignum fixnum-bits hashcode-shift header-bits immediate immediate? leaf-stack-frame-size max-array-capacity mega-cache-size most-negative-fixnum most-positive-fixnum num-types tag-bits tag-fixnum tag-header tag-mask type-number type-numbers untag-fixnum
 SynKeywordFactorWord factorWord_make | syn keyword factorWord_make contained % %% , ,+ ,, building make
 SynKeywordFactorWord factorWord_math | syn keyword factorWord_math contained * + - / /f /i /mod 2/ 2^ < <= <fp-nan> > >= >bignum >fixnum >float >fraction >integer >rect ?1+ abs align all-integers-from? all-integers? bignum bignum? bit? bitand bitnot bitor bits>double bits>float bitxor complex complex? denominator double>bits each-integer each-integer-from even? find-integer find-integer-from find-last-integer fixnum fixnum? float float>bits float? fp-bitwise= fp-infinity? fp-nan-payload fp-nan? fp-qnan? fp-sign fp-snan? fp-special? gcd if-zero imaginary-part integer integer>fixnum integer>fixnum-strict integer? log2 log2-expects-positive log2-expects-positive? mod neg neg? next-float next-power-of-2 number number= number? numerator odd? power-of-2? prev-float ratio ratio? rational rational? real real-part real? recip rect> recursive-hashcode rem sgn shift simple-gcd sq times u< u<= u> u>= unless-zero unordered? until-zero when-zero zero?