Page 1 of 1

how to calculate difference and intersection of two sets?

Posted: Thu Jun 07, 2012 2:15 pm
by Lebesgue
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

Posted: Sat Jun 09, 2012 2:54 am
by edgar-rft
From inside Emacs, first evaluate:

Code: Select all

(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.