Skip to content

Commit

Permalink
sorting: update docs for variadic quots
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Dec 5, 2024
1 parent d4dda8c commit 65f96e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/sorting/sorting-docs.factor
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ $nl
ABOUT: "sequences-sorting"

HELP: sort-with
{ $values { "seq" sequence } { "quot" { $quotation ( obj1 obj2 -- <=> ) } } { "sortedseq" "a new sorted sequence" } }
{ $values { "seq" sequence } { "quot" { $quotation ( ... obj1 obj2 -- ... <=> ) } } { "sortedseq" "a new sorted sequence" } }
{ $description "Sorts the elements of " { $snippet "seq" } " into a new array using a stable sort." }
{ $notes "The algorithm used is the merge sort." } ;

HELP: sort-by
{ $values { "seq" sequence } { "quot" { $quotation ( elt -- key ) } } { "sortedseq" "a new sorted sequence" } }
{ $values { "seq" 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-by
{ $values { "seq" sequence } { "quot" { $quotation ( elt -- key ) } } { "sortedseq" "a new sorted sequence" } }
{ $values { "seq" 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
Expand Down

0 comments on commit 65f96e1

Please sign in to comment.