      { "seq" sequence } { "quot" quotation }
      { "newseq" sequence } }
 { $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 new sequence." }
-{ $example "USING: prettyprint math sequences ;"
-           "{ 0 0 1 2 3 0 0 } [ zero? ] trim-head ."
-           "{ 1 2 3 0 0 }"
+{ $examples
+    { $example "USING: prettyprint math sequences ;"
+               "{ 0 0 1 2 3 0 0 } [ zero? ] trim-head ."
+               "{ 1 2 3 0 0 }"
+    }
 } ;
 
 HELP: trim-head-slice

     { "quot" { $quotation "( ... elt -- ... ? )" } }
     { "selector" { $quotation "( ... elt -- ... )" } } { "accum" vector } }
{ $description "Creates a new vector to accumulate the values which return true for a predicate. Returns a new quotation which accepts an object to be tested and stored in the collector if the test yields true. The collector is left on the stack for convenience." }
{ $example "! Find all the even numbers:" "USING: prettyprint sequences math kernel ;"
           "10 iota [ even? ] selector [ each ] dip ."
           "V{ 0 2 4 6 8 }"
}
{ $notes "Used to implement the " { $link filter } " word. Compare this word with " { $link collector } ", which is an unfiltering version." } ;


     { "seq" sequence } { "quot" quotation }
     { "slice" slice } }
{ $description "Removes elements starting from the right 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." }
{ $examples
    { $example "USING: prettyprint math sequences ;"
               "{ 0 0 1 2 3 0 0 } [ zero? ] trim-tail-slice ."
               "T{ slice { from 0 } { to 5 } { seq { 0 0 1 2 3 0 0 } } }"
    }
} ;

HELP: trim
