From 65f96e1b4667868a0aca2aced8beff75a6d83caa Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 5 Dec 2024 13:29:48 -0800 Subject: [PATCH] sorting: update docs for variadic quots --- core/sorting/sorting-docs.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/sorting/sorting-docs.factor b/core/sorting/sorting-docs.factor index bc3d7286f30..1a7340f0aa7 100644 --- a/core/sorting/sorting-docs.factor +++ b/core/sorting/sorting-docs.factor @@ -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