This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

how to calculate difference and intersection of two sets?

2 posts · 5443 views

Hi,
How to calculate the difference and intersection of two sets,which are lists ?
thx.

Re: how to calculate difference and intersection of two sets

From inside Emacs, first evaluate:
(require 'cl)
You need to evaluate (require 'cl), because the Emacs "set-difference" and "intersection" functions are defined in "cl-seq.el", that is no standard part of Emacs, then try:
  • C-h f set-difference
  • C-h f intersection
and click on the source links in the *Help* buffer. The source links work of course only if the Emacs sources are installed.