            "{ 1 2 3 0 0 }"
 } ;
 
+HELP: trim-left-slice
+{ $values
+     { "seq" sequence } { "quot" quotation }
+     { "slice" slice } }
+{ $description "Removes elements starting from the left side of a sequence if they match a predicate. Once an element does not match, the test stops and the rest of the sequence is left on the stack as a slice" }
+{ $example "" "USING: prettyprint math sequences ;"
+           "{ 0 0 1 2 3 0 0 } [ zero? ] trim-left-slice ."
+           "T{ slice { from 2 } { to 7 } { seq { 0 0 1 2 3 0 0 } } }"
+} ;
+
 HELP: trim-right
 { $values
      { "seq" sequence } { "quot" quotation }

{ $subsection each }
{ $subsection reduce }
{ $subsection interleave }
"Mapping:"
{ $subsection map }
{ $subsection map-as }

HELP: append
{ $values { "seq1" sequence } { "seq2" sequence } { "newseq" sequence } }
{ $description "Outputs a new sequence of the same type as " { $snippet "seq1" } " consisting of the elements of " { $snippet "seq1" } " followed by " { $snippet "seq2" } "." }
{ $errors "Throws an error if " { $snippet "seq2" } " contains elements not permitted in sequences of the same class as " { $snippet "seq1" } "." }
{ $examples 
    { $example "USING: prettyprint sequences ;"
        "{ 1 2 } B{ 3 4 } append ."
        "{ 1 2 3 4 }"
    }
    { $example "USING: prettyprint sequences strings ;"
        "\"go\" \"ing\" append ."
        "\"going\""
    }
} ;

HELP: prepend
{ $values { "seq1" sequence } { "seq2" sequence } { "newseq" sequence } }
{ $description "Outputs a new sequence of the same type as " { $snippet "seq2" } " consisting of the elements of " { $snippet "seq2" } " followed by " { $snippet "seq1" } "." }
{ $errors "Throws an error if " { $snippet "seq1" } " contains elements not permitted in sequences of the same class as " { $snippet "seq2" } "." }
{ $examples 
    { $example "USING: prettyprint sequences ;"
        "{ 1 2 } B{ 3 4 } prepend ."
        "B{ 3 4 1 2 }"
    }
    { $example "USING: prettyprint sequences strings ;"
        "\"go\" \"car\" prepend ."
        "\"cargo\""
    }
} ;

HELP: 3append
{ $values { "seq1" sequence } { "seq2" sequence } { "seq3" sequence } { "newseq" sequence } }
{ $description "Outputs a new sequence consisting of the elements of " { $snippet "seq1" } ", " { $snippet "seq2" } " and " { $snippet "seq3" } " in turn." }
{ $errors "Throws an error if " { $snippet "seq2" } " or " { $snippet "seq3" } " contain elements not permitted in sequences of the same class as " { $snippet "seq1" } "." }
{ $examples
    { $example "USING: prettyprint sequences ;"
        "\"a\" \"b\" \"c\" 3append ."
        "\"abc\""
    }
} ;

HELP: subseq
{ $values { "from" "a non-negative integer" } { "to" "a non-negative integer" } { "seq" sequence } { "subseq" "a new sequence" } }
