diff --git a/basis/grouping/grouping-docs.factor b/basis/grouping/grouping-docs.factor index 44da43a76b..2b183c3364 100644 --- a/basis/grouping/grouping-docs.factor +++ b/basis/grouping/grouping-docs.factor @@ -181,7 +181,7 @@ HELP: { } related-words HELP: monotonic? -{ $values { "seq" sequence } { "quot" { $quotation "( elt elt -- ? )" } } { "?" "a boolean" } } +{ $values { "seq" sequence } { "quot" { $quotation "( elt1 elt2 -- ? )" } } { "?" "a boolean" } } { $description "Applies the relation to successive pairs of elements in the sequence, testing for a truth value. The relation should be a transitive relation, such as a total order or an equality relation." } { $examples "Testing if a sequence is non-decreasing:" diff --git a/basis/grouping/grouping.factor b/basis/grouping/grouping.factor index 1b2563992d..09e87698cf 100644 --- a/basis/grouping/grouping.factor +++ b/basis/grouping/grouping.factor @@ -99,7 +99,7 @@ INSTANCE: sliced-clumps abstract-clumps : clump ( seq n -- array ) { } like ; -: monotonic? ( seq quot: ( obj1 obj2 -- ? ) -- ? ) +: monotonic? ( seq quot: ( elt1 elt2 -- ? ) -- ? ) over length 2 < [ 2drop t ] [ over length 2 = [ [ first2-unsafe ] dip call diff --git a/basis/threads/threads-docs.factor b/basis/threads/threads-docs.factor index 3e63a81d9a..563a59dde9 100644 --- a/basis/threads/threads-docs.factor +++ b/basis/threads/threads-docs.factor @@ -181,5 +181,5 @@ HELP: tset { $description "Sets the value of a thread-local variable." } ; HELP: tchange -{ $values { "key" object } { "quot" { $quotation "( value -- newvalue )" } } } +{ $values { "key" object } { "quot" { $quotation "( ..a value -- ..b newvalue )" } } } { $description "Applies the quotation to the current value of a thread-local variable, storing the result back to the same variable." } ; diff --git a/core/sorting/sorting-docs.factor b/core/sorting/sorting-docs.factor index 4877cdf410..6bff4281c9 100644 --- a/core/sorting/sorting-docs.factor +++ b/core/sorting/sorting-docs.factor @@ -28,11 +28,11 @@ HELP: sort { $notes "The algorithm used is the merge sort." } ; HELP: sort-with -{ $values { "seq" "a sequence" } { "quot" { $quotation "( object -- key )" } } { "sortedseq" "a new sorted sequence" } } +{ $values { "seq" "a sequence" } { "quot" { $quotation "( elt -- key )" } } { "sortedseq" "a new sorted sequence" } } { $description "Sorts the elements of " { $snippet "seq" } " by applying " { $link compare } " with " { $snippet "quot" } " to each pair of elements in the sequence." } ; HELP: inv-sort-with -{ $values { "seq" "a sequence" } { "quot" { $quotation "( object -- key )" } } { "sortedseq" "a new sorted sequence" } } +{ $values { "seq" "a sequence" } { "quot" { $quotation "( elt -- key )" } } { "sortedseq" "a new sorted sequence" } } { $description "Sorts the elements of " { $snippet "seq" } " by applying " { $link compare } " with " { $snippet "quot" } " to each pair of elements in the sequence and inverting the results." } ; HELP: sort-keys diff --git a/core/splitting/splitting-docs.factor b/core/splitting/splitting-docs.factor index 5085571312..0e8e392879 100644 --- a/core/splitting/splitting-docs.factor +++ b/core/splitting/splitting-docs.factor @@ -39,7 +39,7 @@ HELP: split1-last-slice { split1 split1-slice split1-last split1-last-slice } related-words HELP: split-when -{ $values { "seq" "a sequence" } { "quot" { $quotation "( elt -- ? )" } } { "pieces" "a new array" } } +{ $values { "seq" "a sequence" } { "quot" { $quotation "( ... elt -- ... ? )" } } { "pieces" "a new array" } } { $description "Splits " { $snippet "seq" } " at each occurrence of an element for which " { $snippet "quot" } " gives a true output and outputs an array of pieces. The pieces do not include the elements along which the sequence was split." } { $examples { $example "USING: ascii kernel prettyprint splitting ;" "\"hello,world-how.are:you\" [ letter? not ] split-when ." "{ \"hello\" \"world\" \"how\" \"are\" \"you\" }" } } ;