 { $description "Applies the quotation to each element in turn, and removes elements for which the quotation outputs a false value." }
 { $side-effects "seq" } ;
 
-{ filter filter-as filter! } related-words
-
 HELP: reject
 { $values { "seq" sequence } { "quot" { $quotation ( ... elt -- ... ? ) } } { "subseq" "a new sequence" } }
 { $description "Applies the quotation to each element in turn, and outputs a new sequence removing with the elements of the original sequence for which the quotation output a true value." } ;

{ $side-effects "seq" }
{ $examples
    { $example "USING: math prettyprint sequences ;" "{ 2 2 2 2 2 } 0 [ + ] accumulate*! ." "{ 2 4 6 8 10 }" }
} ;

{ accumulate accumulate! accumulate-as accumulate* accumulate*! accumulate*-as } related-words


    { { $link reverse } { $link reverse! } }
    { { $link append } { $link append! } }
    { { $link map } { $link map! } }
    { { $link accumulate } { $link accumulate! } }
    { { $link accumulate* } { $link accumulate*! } }
    { { $link filter } { $link filter! } }
}
"Changing elements:"
{ $subsections map! accumulate! accumulate*! change-nth }
"Deleting elements:"
{ $subsections
    remove!
