]> gitweb.factorcode.org Git - factor.git/commitdiff
core/basis/extra: update some stack effects
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 31 Jan 2024 23:39:37 +0000 (15:39 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 31 Jan 2024 23:39:37 +0000 (15:39 -0800)
basis/math/primes/erato/fast/fast.factor
basis/ui/gadgets/gadgets-docs.factor
basis/ui/gadgets/gadgets.factor
core/classes/tuple/tuple.factor
extra/logic/logic.factor
extra/trails/trails.factor

index 0f18e8f30e7424ec9ef7ec4d145d9421263b2781..8df686da09f283f20a80d4b7915cbe6e3430fef9 100644 (file)
@@ -15,7 +15,7 @@ CONSTANT: wheel-2-3-5-7 $[
     ] B{ } filter-as differences
 ]
 
-:: each-prime ( upto sieve quot -- )
+:: each-prime ( ... upto sieve quot: ( ... n -- ... ) -- ... )
     11 upto integer>fixnum-strict '[ dup _ <= ] [
         wheel-2-3-5-7 [
             over dup 2/ sieve nth-unsafe [ drop ] quot if
index daddebcb3a3deca8746d77b2f4f46dfae2f6c2d0..c8f9ecab696a428e8b924a9a13e2649f5868f483 100644 (file)
@@ -61,7 +61,7 @@ HELP: max-dims
 { pref-dims max-dims sum-dims } related-words
 
 HELP: each-child
-{ $values { "gadget" gadget } { "quot" { $quotation ( child -- ) } } }
+{ $values { "gadget" gadget } { "quot" { $quotation ( ... child -- ... ) } } }
 { $description "Applies the quotation to each child of the gadget." } ;
 
 HELP: gadget-selection?
@@ -163,11 +163,11 @@ HELP: child?
 { $description "Tests if " { $snippet "child" } " is contained inside " { $snippet "parent" } "." } ;
 
 HELP: each-parent
-{ $values { "gadget" gadget } { "quot" { $quotation ( gadget -- ? ) } } { "?" boolean } }
+{ $values { "gadget" gadget } { "quot" { $quotation ( ... gadget -- ... ? ) } } { "?" boolean } }
 { $description "Applies the quotation to every parent of the gadget, starting from the gadget itself, stopping if the quotation yields " { $link f } ". Outputs " { $link t } " if the iteration completed, and outputs " { $link f } " if it was stopped prematurely." } ;
 
 HELP: find-parent
-{ $values { "gadget" gadget } { "quot" { $quotation ( gadget -- ? ) } } { "parent" gadget } }
+{ $values { "gadget" gadget } { "quot" { $quotation ( ... gadget -- ... ? ) } } { "parent" gadget } }
 { $description "Outputs the first parent of the gadget, starting from the gadget itself, for which the quotation outputs a true value, or " { $link f } " if the quotation outputs " { $link f } " for every parent." } ;
 
 HELP: focusable-child*
index 66b78431d1dc52ae7bd36108a5fae3a5760e95af..40cd3ea98cd062f13bbd60757ed9d6cc1366ea24 100644 (file)
@@ -95,7 +95,7 @@ M: gadget contains-point?
 : sum-dims ( seq -- dim )
     [ 0 0 ] dip [ first2 swapd [ + ] 2bi@ ] each 2array ;
 
-: each-child ( gadget quot -- )
+: each-child ( ... gadget quot: ( ... child -- ... ) -- ... )
     [ children>> ] dip each ; inline
 
 ! Selection protocol
@@ -348,10 +348,10 @@ PRIVATE>
 : parents ( gadget -- seq )
     [ parent>> ] follow ;
 
-: each-parent ( gadget quot -- ? )
+: each-parent ( ... gadget quot: ( ... gadget -- ... ? ) -- ... ? )
     [ parents ] dip all? ; inline
 
-: find-parent ( gadget quot -- parent )
+: find-parent ( ... gadget quot: ( ... gadget -- ... ? ) -- ... parent )
     [ parents ] dip find nip ; inline
 
 : screen-loc ( gadget -- loc )
index 4b329e2efa10b2923e1a60cd31e3e3fdf21506dc..53914ea5c1242cad1840beafba354ac6a3d9b8f2 100644 (file)
@@ -263,7 +263,7 @@ M: tuple-class update-class
 : subclasses ( class -- classes )
     class-usages [ tuple-class? ] filter ;
 
-: each-subclass ( class quot -- )
+: each-subclass ( ... class quot: ( ... subclass -- ... ) -- ... )
     [ subclasses ] dip each ; inline
 
 : redefine-tuple-class ( class superclass slots -- )
index 154052808f0d59e5a7f85742a5f442f1dbb9ec01..ee37077c18d55aa75b04d58190fa3f13ae49e9cf 100644 (file)
@@ -131,7 +131,7 @@ C: <cut> cut-info inline
 : set-info-if-f ( ? cut-info -- )
     dup cut?>> [ 2drop ] [ cut?<< ] if ; inline
 
-: 2each-until ( seq1 seq2 quot -- all-failed? ) 2 nfind 2drop f = ; inline
+: 2each-until ( ... seq1 seq2 quot: ( ... elt1 elt2 -- ... ? ) -- ... all-failed? ) 2 nfind 2drop f = ; inline
 
 DEFER: unify*
 
@@ -585,7 +585,7 @@ PRIVATE>
 
 <PRIVATE
 
-: each-until ( seq quot -- ) find 2drop ; inline
+: each-until ( ... seq quot: ( ... elt -- ... ? ) -- ... ) find 2drop ; inline
 
 :: resolve-body ( body env cut quot: ( -- ) -- )
     body empty? [
index 58d5be8db568765e238f96ba19ff6fb8e55c9214..a24ea362a42e43730db12833d94e3a6490883f4b 100644 (file)
@@ -31,7 +31,7 @@ M: trails-gadget ungraft*
 
 M: trails-gadget pref-dim* drop { 500 500 } ;
 
-: each-percent ( seq quot -- )
+: each-percent ( ... seq quot: ( ... elt percent -- ... ) -- ... )
     [ dup length ] dip '[ 1 + _ / @ ] each-index ; inline
 
 M:: trails-gadget draw-gadget* ( GADGET -- )