From 2e0139110517b7a09da2edd0e9ba0e718aa837a0 Mon Sep 17 00:00:00 2001 From: slava Date: Fri, 18 Aug 2006 03:15:36 +0000 Subject: [PATCH] Minor fixes --- library/collections/sequences-epilogue.factor | 3 ++- library/collections/sequences-epilogue.facts | 2 +- library/collections/slicing.factor | 2 +- library/help/porter-stemmer.facts | 18 +++++++++--------- library/io/plain-stream.facts | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/library/collections/sequences-epilogue.factor b/library/collections/sequences-epilogue.factor index a67cb8c66d..6ac25bc786 100644 --- a/library/collections/sequences-epilogue.factor +++ b/library/collections/sequences-epilogue.factor @@ -90,7 +90,8 @@ M: object like drop ; : pop* ( seq -- ) dup length 1- swap set-length ; -: pop ( seq -- ) dup length 1- swap [ nth ] 2keep set-length ; +: pop ( seq -- elt ) + dup length 1- swap [ nth ] 2keep set-length ; : all-equal? ( seq -- ? ) [ = ] monotonic? ; diff --git a/library/collections/sequences-epilogue.facts b/library/collections/sequences-epilogue.facts index 4ce92850f2..d6b66788fa 100644 --- a/library/collections/sequences-epilogue.facts +++ b/library/collections/sequences-epilogue.facts @@ -151,7 +151,7 @@ HELP: pop* { $see-also peek pop } ; HELP: pop -{ $values { "seq" "a resizable mutable sequence" } } +{ $values { "seq" "a resizable mutable sequence" } { "elt" "an object" } } { $description "Outputs the last element after removing it and shortening the sequence." } { $side-effects "seq" } { $errors "Throws an error if the sequence is empty." } diff --git a/library/collections/slicing.factor b/library/collections/slicing.factor index 792727b803..174f04814a 100644 --- a/library/collections/slicing.factor +++ b/library/collections/slicing.factor @@ -34,7 +34,7 @@ strings vectors ; : ?head ( seq begin -- newseq ? ) 2dup head? [ length tail t ] [ drop f ] if ; -: tail? ( seq end -- newseq ? ) +: tail? ( seq end -- ? ) 2dup [ length ] 2apply < [ 2drop f ] [ diff --git a/library/help/porter-stemmer.facts b/library/help/porter-stemmer.facts index f64af2788f..f76f8a4907 100644 --- a/library/help/porter-stemmer.facts +++ b/library/help/porter-stemmer.facts @@ -21,15 +21,15 @@ HELP: step1b { $examples { $table { "Input:" "Output:" } - { "feed" } { "feed" } - { "agreed" } { "agree" } - { "disabled" } { "disable" } - { "matting" } { "mat" } - { "mating" } { "mate" } - { "meeting" } { "meet" } - { "milling" } { "mill" } - { "messing" } { "mess" } - { "meetings" } { "meet" } + { "feed" "feed" } + { "agreed" "agree" } + { "disabled" "disable" } + { "matting" "mat" } + { "mating" "mate" } + { "meeting" "meet" } + { "milling" "mill" } + { "messing" "mess" } + { "meetings" "meet" } } } ; diff --git a/library/io/plain-stream.facts b/library/io/plain-stream.facts index e57c6d18fc..4e2509f16a 100644 --- a/library/io/plain-stream.facts +++ b/library/io/plain-stream.facts @@ -4,4 +4,4 @@ HELP: { $values { "stream" "an input stream" } { "new-stream" "an input stream" } } { $description "Wraps an input stream in a stream supporting the extended stream output protocol in a trivial way." } { $notes "Stream constructors should call this word to wrap streams that do not natively support the extended stream output protocol." } -{ $see "stream-protocol" } ; +{ $see-also "stream-protocol" } ;