aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/sequences.texi27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 93e8fa8a5fa..c7cf9f5e1af 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -792,6 +792,33 @@ it is a function of two arguments to use instead of the default @code{equal}.
792 792
793@end defun 793@end defun
794 794
795@defun seq-set-equal-p sequence1 sequence2 &optional testfn
796This function checks whether @var{sequence1} and @var{sequence2}
797contain the same elements, regardless of the order. If the optional
798argument @var{testfn} is non-@code{nil}, it is a function of two
799arguments to use instead of the default @code{equal}.
800
801@example
802@group
803(seq-set-equal-p '(a b c) '(c b a))
804@result{} t
805@end group
806@group
807(seq-set-equal-p '(a b c) '(c b))
808@result{} nil
809@end group
810@group
811(seq-set-equal-p '("a" "b" "c") '("c" "b" "a"))
812@result{} t
813@end group
814@group
815(seq-set-equal-p '("a" "b" "c") '("c" "b" "a") #'eq)
816@result{} nil
817@end group
818@end example
819
820@end defun
821
795@defun seq-position sequence elt &optional function 822@defun seq-position sequence elt &optional function
796 This function returns the index of the first element in 823 This function returns the index of the first element in
797@var{sequence} that is equal to @var{elt}. If the optional argument 824@var{sequence} that is equal to @var{elt}. If the optional argument