如何在emacs lisp中计算两个集合之间的差异,集合应该是列表 [英] How to calculate difference between two sets in emacs lisp,the sets should be lists

查看:75
本文介绍了如何在emacs lisp中计算两个集合之间的差异,集合应该是列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何计算Emacs Lisp中两组之间的差异?集合应该是列表. 该程序应该非常简单且简短,否则我将无法理解.我是新手.

How to calculate the difference between two sets in Emacs Lisp? The sets should be lists. The programm should be very simple and short, or else I won't understand it. I'm a newbee.

Thx

推荐答案

Common Lisp扩展中有一个set-difference函数:

There is a set-difference function in the Common Lisp extensions:

elisp> (require 'cl)
cl
elisp> (set-difference '(1 2 3) '(2 3 4))
(1)

这篇关于如何在emacs lisp中计算两个集合之间的差异,集合应该是列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆