]> gitweb.factorcode.org Git - factor.git/blobdiff - core/sequences/sequences-docs.factor
sequences: fix docs
[factor.git] / core / sequences / sequences-docs.factor
index de5950322b40fc1f4a3c73297451fb8d09965eda..1ae56566fd588861b3ea4e342b01dac4de108d92 100644 (file)
@@ -31,11 +31,6 @@ HELP: nth
 { $contract "Outputs the " { $snippet "n" } "th element of the sequence. Elements are numbered from zero, so the last element has an index one less than the length of the sequence. All sequences support this operation." }
 { $errors "Throws a " { $link bounds-error } " if the index is negative, or greater than or equal to the length of the sequence." } ;
 
-HELP: nth-of
-{ $values { "seq" sequence } { "n" "a non-negative integer" } { "elt" "the element at the " { $snippet "n" } "th index" } }
-{ $contract "Outputs the " { $snippet "n" } "th element of the sequence. Elements are numbered from zero, so the last element has an index one less than the length of the sequence. All sequences support this operation." }
-{ $errors "Throws a " { $link bounds-error } " if the index is negative, or greater than or equal to the length of the sequence." } ;
-
 HELP: set-nth
 { $values { "elt" object } { "n" "a non-negative integer" } { "seq" "a mutable sequence" } }
 { $contract "Sets the " { $snippet "n" } "th element of the sequence. Storing beyond the end of a resizable sequence such as a vector or string buffer grows the sequence." }
@@ -189,15 +184,7 @@ HELP: ??nth
 { $values { "n" integer } { "seq" sequence } { "elt/f" { $maybe object } } { "?" boolean } }
 { $description "A forgiving version of " { $link nth } ". If the index is out of bounds, or if the sequence is " { $link f } ", simply outputs " { $link f } ". Also outputs a boolean to distinguish between the sequence containing an " { $link f } " or an out of bounds index." } ;
 
-HELP: ?nth-of
-{ $values { "seq" sequence } { "n" integer } { "elt/f" { $maybe object } } }
-{ $description "A forgiving version of " { $link nth-of } ". If the index is out of bounds, or if the sequence is " { $link f } ", simply outputs " { $link f } "." } ;
-
-HELP: ??nth-of
-{ $values { "seq" sequence } { "n" integer } { "elt/f" { $maybe object } } { "?" boolean } }
-{ $description "A forgiving version of " { $link nth-of } ". If the index is out of bounds, or if the sequence is " { $link f } ", simply outputs " { $link f } ". Also outputs a boolean to distinguish between the sequence containing an " { $link f } " or an out of bounds index." } ;
-
-{ nth ?nth ??nth nth-of ?nth-of ??nth-of } related-words
+{ nth ?nth ??nth } related-words
 
 HELP: ?set-nth
 { $values { "elt" object } { "n" integer } { "seq" sequence } }
@@ -1848,7 +1835,7 @@ ARTICLE: "sequence-protocol" "Sequence protocol"
 "All sequences must know their length:"
 { $subsections length }
 "At least one of the following two generic words must have a method for accessing elements; the " { $link sequence } " mixin has default definitions which are mutually recursive:"
-{ $subsections nth nth-unsafe ?nth ??nth nth-of ?nth-of ??nth-of }
+{ $subsections nth nth-unsafe ?nth }
 "Note that sequences are always indexed starting from zero."
 $nl
 "At least one of the following two generic words must have a method for storing elements; the " { $link sequence } " mixin has default definitions which are mutually recursive:"
@@ -1898,7 +1885,7 @@ $nl
 
 ARTICLE: "sequences-access" "Accessing sequence elements"
 "Element access by index, without raising exceptions:"
-{ $subsections ?nth ??nth ?nth-of ??nth-of }
+{ $subsections ?nth }
 "Concise way of extracting one of the first four elements:"
 { $subsections first second third fourth ?first ?second }
 "Extracting the last element:"