Fixing docs for recent stack effects additions.
parent
22f1545ec5
commit
a916bebcfe
|
@ -181,7 +181,7 @@ HELP: <sliced-circular-clumps>
|
|||
{ <sliced-clumps> <sliced-circular-clumps> <sliced-groups> } 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:"
|
||||
|
|
|
@ -99,7 +99,7 @@ INSTANCE: sliced-clumps abstract-clumps
|
|||
|
||||
: clump ( seq n -- array ) <clumps> { } like ;
|
||||
|
||||
: monotonic? ( seq quot: ( obj1 obj2 -- ? ) -- ? )
|
||||
: monotonic? ( seq quot: ( elt1 elt2 -- ? ) -- ? )
|
||||
over length 2 < [ 2drop t ] [
|
||||
over length 2 = [
|
||||
[ first2-unsafe ] dip call
|
||||
|
|
|
@ -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." } ;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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\" }" } } ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue