Mercurial > emacs
comparison lisp/emacs-lisp/cl-seq.el @ 62426:c5a3c48f99b5
(subsetp, tree-equal): Doc fixes.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Tue, 17 May 2005 00:27:32 +0000 |
parents | 695cf19ef79e |
children | e74fa19e333d f042e7c0fe20 |
comparison
equal
deleted
inserted
replaced
62425:b8c3e904ae10 | 62426:c5a3c48f99b5 |
---|---|
798 ((equal cl-list1 cl-list2) nil) | 798 ((equal cl-list1 cl-list2) nil) |
799 (t (nconc (apply 'nset-difference cl-list1 cl-list2 cl-keys) | 799 (t (nconc (apply 'nset-difference cl-list1 cl-list2 cl-keys) |
800 (apply 'nset-difference cl-list2 cl-list1 cl-keys))))) | 800 (apply 'nset-difference cl-list2 cl-list1 cl-keys))))) |
801 | 801 |
802 (defun subsetp (cl-list1 cl-list2 &rest cl-keys) | 802 (defun subsetp (cl-list1 cl-list2 &rest cl-keys) |
803 "True if LIST1 is a subset of LIST2. | 803 "Return true if LIST1 is a subset of LIST2. |
804 I.e., if every element of LIST1 also appears in LIST2. | 804 I.e., if every element of LIST1 also appears in LIST2. |
805 Keywords supported: :test :test-not :key" | 805 Keywords supported: :test :test-not :key" |
806 (cond ((null cl-list1) t) ((null cl-list2) nil) | 806 (cond ((null cl-list1) t) ((null cl-list2) nil) |
807 ((equal cl-list1 cl-list2) t) | 807 ((equal cl-list1 cl-list2) t) |
808 (t (cl-parsing-keywords (:key) (:test :test-not) | 808 (t (cl-parsing-keywords (:key) (:test :test-not) |
886 (if cl-p | 886 (if cl-p |
887 (progn (setcdr cl-tree (cdr (car cl-p))) (setq cl-tree nil)) | 887 (progn (setcdr cl-tree (cdr (car cl-p))) (setq cl-tree nil)) |
888 (setq cl-tree (cdr cl-tree)))))) | 888 (setq cl-tree (cdr cl-tree)))))) |
889 | 889 |
890 (defun tree-equal (cl-x cl-y &rest cl-keys) | 890 (defun tree-equal (cl-x cl-y &rest cl-keys) |
891 "T if trees X and Y have `eql' leaves. | 891 "Return t if trees X and Y have `eql' leaves. |
892 Atoms are compared by `eql'; cons cells are compared recursively. | 892 Atoms are compared by `eql'; cons cells are compared recursively. |
893 Keywords supported: :test :test-not :key" | 893 Keywords supported: :test :test-not :key" |
894 (cl-parsing-keywords (:test :test-not :key) () | 894 (cl-parsing-keywords (:test :test-not :key) () |
895 (cl-tree-equal-rec cl-x cl-y))) | 895 (cl-tree-equal-rec cl-x cl-y))) |
896 | 896 |