how to calculate difference and intersection of two sets?

Discussion of Emacs Lisp
Post Reply
Lebesgue
Posts: 1
Joined: Thu Jun 07, 2012 2:10 pm

how to calculate difference and intersection of two sets?

Post by Lebesgue » Thu Jun 07, 2012 2:15 pm

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

edgar-rft
Posts: 226
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany

Re: how to calculate difference and intersection of two sets

Post by edgar-rft » Sat Jun 09, 2012 2:54 am

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.

Post Reply