]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/sequences/extras/extras-docs.factor
sequences: fix docs
[factor.git] / extra / sequences / extras / extras-docs.factor
index 2a71908fbcfe6e712c8a9790204f462bcc25a750..f1a2d822c41988e4a10303ecc8a9797bd7dbdd1a 100644 (file)
@@ -1048,6 +1048,11 @@ HELP: merge-slices
     { "slice/*" object }
 } ;
 
+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: nth*
 { $values
     { "n" integer } { "seq" sequence }