{ $description "Replaces a range of elements beginning at index " { $snippet "from" } " and ending before index " { $snippet "to" } " with a new sequence." }
{ $errors "Throws an error if " { $snippet "new" } " contains elements whose types are not permissible in " { $snippet "seq" } "." } ;
-{ push prefix suffix } related-words
+{ push push-either push-if pop pop* prefix suffix suffix! } related-words
HELP: suffix
{ $values { "seq" sequence } { "elt" object } { "newseq" sequence } }
{ $description "Outputs the last element of a sequence." }
{ $errors "Throws an error if the sequence is empty." } ;
-{ pop pop* } related-words
-
HELP: pop*
{ $values { "seq" "a resizable mutable sequence" } }
{ $description "Removes the last element and shortens the sequence." }
}
} ;
-{ append append-as } related-words
+{ append append-as append! 3append 3append-as push-all } related-words
HELP: prepend
{ $values { "seq1" sequence } { "seq2" sequence } { "newseq" sequence } }
}
} ;
-{ 3append 3append-as } related-words
-
HELP: surround
{ $values { "seq1" sequence } { "seq2" sequence } { "seq3" sequence } { "newseq" sequence } }
{ $description "Outputs a new sequence with " { $snippet "seq1" } " inserted between " { $snippet "seq2" } " and " { $snippet "seq3" } "." }
}
{ $errors "Throws an error if the index is out of bounds." } ;
+{ tail tail* tail-slice tail-slice* } related-words
+{ head head* head-slice head-slice* } related-words
+{ cut cut* cut-slice } related-words
+{ unclip unclip-slice unclip-last unclip-last-slice } related-words
+{ first last but-last but-last-slice rest rest-slice } related-words
+
HELP: shorter?
{ $values { "seq1" sequence } { "seq2" sequence } { "?" boolean } }
{ $description "Tests if the length of " { $snippet "seq1" } " is smaller than the length of " { $snippet "seq2" } "." } ;