how to calculate difference and intersection of two sets?

Discussion of Emacs Lisp

how to calculate difference and intersection of two sets?

Postby Lebesgue » Thu Jun 07, 2012 2:15 pm

Hi,
How to calculate the difference and intersection of two sets,which are lists ?
thx.
Lebesgue
 
Posts: 1
Joined: Thu Jun 07, 2012 2:10 pm

Re: how to calculate difference and intersection of two sets

Postby 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.
edgar-rft
 
Posts: 147
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany


Return to Emacs Lisp

Who is online

Users browsing this forum: No registered users and 1 guest

cron