@cindex sequence functions in seq
@cindex seq library
+@cindex sequences, generalized
The @file{seq.el} library provides the following additional sequence
manipulation macros and functions, prefixed with @code{seq-}. To use
them, you must first load the @file{seq} library.
@end defun
@defun seq-subseq sequence start &optional end
+@cindex sub-sequence
This function returns a subset of @var{sequence} from @var{start}
to @var{end}, both integers (@var{end} defaults to the last element).
If @var{start} or @var{end} is negative, it counts from the end of
@end defun
@defun seq-intersection sequence1 sequence2 &optional function
+@cindex sequences, intersection of
+@cindex intersection of sequences
This function returns a list of the elements that appear both in
@var{sequence1} and @var{sequence2}. If the optional argument
@var{function} is non-@code{nil}, it is a function of two arguments to
@end defun
@defun seq-into sequence type
+@cindex convert sequence to another type
+@cindex list to vector
+@cindex vector to list
+@cindex string to vector
This function converts the sequence @var{sequence} into a sequence
of type @var{type}. @var{type} can be one of the following symbols:
@code{vector}, @code{string} or @code{list}.
@end defun
@defun seq-min sequence
+@cindex minimum value of sequence
+@cindex sequence minimum
This function returns the smallest element of @var{sequence}. The
elements of @var{sequence} must be numbers or markers
(@pxref{Markers}).
@end defun
@defun seq-max sequence
+@cindex maximum value of sequence
+@cindex sequence maximum
This function returns the largest element of @var{sequence}. The
elements of @var{sequence} must be numbers or markers.
@defmac seq-doseq (var sequence) body@dots{}
@cindex sequence iteration
+@cindex iteration over vector or string
This macro is like @code{dolist} (@pxref{Iteration, dolist}), except
that @var{sequence} can be a list, vector or string. This is
primarily useful for side-effects.