From af9e85550e5768371e26eea4c7361244f639144f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 15 Sep 2008 10:07:13 -0500 Subject: [PATCH] document remove-nth --- core/sequences/sequences-docs.factor | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/sequences/sequences-docs.factor b/core/sequences/sequences-docs.factor index dc45670aab..a0691f0d82 100755 --- a/core/sequences/sequences-docs.factor +++ b/core/sequences/sequences-docs.factor @@ -695,6 +695,16 @@ HELP: remove { $values { "obj" object } { "seq" sequence } { "newseq" "a new sequence" } } { $description "Outputs a new sequence containing all elements of the input sequence except those equal to the given element." } ; +HELP: remove-nth +{ $values + { "n" integer } { "seq" sequence } + { "seq'" sequence } } +{ $description "Creates a new sequence without the element at index " { $snippet "n" } "." } +{ $examples "Notice that the original sequence is left intact:" { $example "USING: sequences prettyprint kernel ;" + "{ 1 2 3 } 1 over remove-nth . ." + "{ 1 3 }\n{ 1 2 3 }" +} } ; + HELP: move { $values { "from" "an index in " { $snippet "seq" } } { "to" "an index in " { $snippet "seq" } } { "seq" "a mutable sequence" } } { $description "Sets the element with index " { $snippet "m" } " to the element with index " { $snippet "n" } "." }