WJ wrote:
> Barry Margolin wrote:
>
> > (defun (all-elements-equal (list)
> > (destructuring-bind (head . tail) list
> > (every #'(lambda (x) (equal x head))
> > tail))))
The fellow didn't even test that once; he merely
assumed that he was infallible.
It ought to have been:
(defun all-elements-equal (list)
(destructuring-bind (head . tail) list
(every #'(lambda (x) (equal x head))
tail)))
This is another example of the insufferable, overweening pride
of worshippers of Commune Lisp.
EMACS Lisp:
(require 'cl)
(defun* all-elements-equal ((head . tail))
(every (apply-partially 'equal head) tail))