[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is there a function like equal but for a list
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de
- Subject: Re: is there a function like equal but for a list
- From: dudeyp@research.CS.ORST.EDU (Peter Dudey Drake)
- Date: Fri, 10 Feb 95 21:57:04 PST
- In-reply-to: <9502102315.AA83942@shakey> (dxs@evolving.com)
Is there any problem with this?
(defun all-equal (list)
(every #'(lambda (x) (equal x (car list)))
(rest list)))
Hmmm, would it be slightly more efficient to do this?
(defun all-equal (list)
(every (function `(lambda (x) ,(car list)))
(rest list)))
+- PETER DUDEY DRAKE 279-D SE Lilly Ave., Corvallis, OR 97333 -+
| MS student in Artificial Intelligence, Oregon State University |
| Where I come from, we're ALL like this. |
+- drakep@research.cs.orst.edu (finger dudeyp@research.cs.orst.edu) -+