From: yamaoka Date: Wed, 24 Nov 1999 13:37:43 +0000 (+0000) Subject: (gnus-union): New function. X-Git-Tag: t-gnus-6_13_3-05~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=485b35a99c84e1a521e6285fae07f5e273b1eb88;p=elisp%2Fgnus.git- (gnus-union): New function. --- diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index de5e352..d7a81f8 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1005,6 +1005,15 @@ ARG is passed to the first function." (car (symbol-value sym)))))) hashtb)))) +(defun gnus-union (a b) + "Add members of list A to list B +if they are not equal to items already in B." + (if (null a) + b + (if (member (car a) b) + (gnus-union (cdr a) b) + (gnus-union (cdr a) (cons (car a) b))))) + (provide 'gnus-util) ;;; gnus-util.el ends here