From b6875f0fc82253b219b7c68b149e012130dbfade Mon Sep 17 00:00:00 2001 From: slava Date: Mon, 24 Jul 2006 06:23:15 +0000 Subject: [PATCH] Update >sequence docs --- TODO.FACTOR.txt | 1 + library/collections/sequence-combinators.facts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 49548a960f..9937307d95 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -23,6 +23,7 @@ + ui: - support x11's large selections, if needed +- own-selection violates ICCCM - one-column table doesn't need borders...? [2:45pm] tathi: Factor's text display is a bit odd sometimes, until you mouse over (or click, if there's no "live" text) [2:48pm] tathi: it appears to be using the font metrics from the sprite tuple, but re-using the texture from the previous letter diff --git a/library/collections/sequence-combinators.facts b/library/collections/sequence-combinators.facts index 70b5f88a33..776fa2d5d0 100644 --- a/library/collections/sequence-combinators.facts +++ b/library/collections/sequence-combinators.facts @@ -159,7 +159,7 @@ HELP: copy-into "( n dest src -- )" { $description "Copies all elements of " { $snippet "src" } " to " { $snippet "dest" } ", with destination indices starting from " { $snippet "n" } ". Grows " { $snippet "to" } " first if necessary." } { $errors "An error is thrown if " { $snippet "to" } " is not resizable, and not large enough to hold the copied elements." } ; -HELP: >sequence "( seq quot -- )" -{ $values { "seq" "a sequence" } { "quot" "a quotation with stack effect " { $snippet "( n -- newseq )" } } { "newseq" "a sequence" } } -{ $description "Calls the quotation with the length of " { $snippet "seq" } ", creating a new sequence, and copies the contents of " { $snippet "seq" } " into the new sequence." } +HELP: >sequence "( seq pred quot -- )" +{ $values { "seq" "a sequence" } { "pred" "a quotation with stack effect " { $snippet "( seq -- ? )" } }{ "quot" "a quotation with stack effect " { $snippet "( n -- newseq )" } } { "newseq" "a freshly-allocated sequence" } } +{ $description "If " { $snippet "pred" } " answers a true value given " { $snippet "seq" } ", clones " { $snippet "seq" } ". Otherwise, calls " { $snippet "quot" } " with the length of " { $snippet "seq" } ", creating a new sequence, and copies the contents of " { $snippet "seq" } " into the new sequence." } { $notes "This word is used to implement words which convert one type of sequence into another, for example " { $link >array } "." } ;