 "Finding the start of a subsequence:"
 { $subsections
     subseq-start
+    subseq-start-from
     subseq-index
     subseq-index-from
     subseq-starts-at?


{ tail-slice tail-slice* } related-words

HELP: head
{ $values { "seq" sequence } { "n" "a non-negative integer" } { "headseq" "a new sequence" } }
{ $description "Outputs a new sequence consisting of the first " { $snippet "n" } " elements of the input sequence." }

HELP: infimum
{ $values { "seq" sequence } { "elt" object } }
{ $description "Outputs the least element of " { $snippet "seq" } "." }
{ $examples
    "Example:"
    { $example "USING: sequences prettyprint ;"
        "{ 1 2 3 4 5 } infimum ."
        "1"
    }
    "Example:"
    { $example "USING: sequences prettyprint ;"
        "{ \"c\" \"b\" \"a\" } infimum ."
        "\"a\""
    }
}
{ $errors "Throws an error if the sequence is empty." } ;

HELP: infimum-by
{ $values
    { "seq" sequence } { "quot" quotation }
    { "elt" object }
}
{ $description "Outputs the least element of " { $snippet "seq" } " according to the " { $snippet "quot" } "." }
{ $examples
    "Example:"
    { $example "USING: sequences prettyprint ;"
        "{ { 1 2 } { 1 2 3 } { 1 2 3 4 } } [ length ] infimum-by ."
        "{ 1 2 }"
    }
}
{ $errors "Throws an error if the sequence is empty." } ;

HELP: supremum
{ $values { "seq" sequence } { "elt" object } }
{ $description "Outputs the greatest element of " { $snippet "seq" } "." }
{ $examples
    "Example:"
    { $example "USING: sequences prettyprint ;"
        "{ 1 2 3 4 5 } supremum ."
        "5"
    }
    "Example:"
    { $example "USING: sequences prettyprint ;"
        "{ \"c\" \"b\" \"a\" } supremum ."
        "\"c\""
    }
}
{ $errors "Throws an error if the sequence is empty." } ;

HELP: supremum-by
{ $values
    { "seq" sequence } { "quot" quotation }
    { "elt" object }
}
{ $description "Outputs the greatest element of " { $snippet "seq" } " according to the " { $snippet "quot" } "." }
{ $examples
    "Example:"
    { $example "USING: sequences prettyprint ;"
        "{ { 1 2 } { 1 2 3 } { 1 2 3 4 } } [ length ] supremum-by ."
        "{ 1 2 3 4 }"
    }
}
{ $errors "Throws an error if the sequence is empty." } ;

{ min max infimum infimum-by supremum supremum-by } related-words

HELP: shortest
{ $values { "seqs" sequence } { "elt" object } }
