Comment by sinsudo
2 hours ago
I know that the purpose of the page is to compare syntax of common lisp, racket, clojure, and emacs lisp. But some examples could be more idiomatic, for instance instead of
(defun add (a &rest b)
(if (null b)
a
(+ a (eval (cons '+ b)))))
One should avoid eval and use endp instead of null:
(defun add (a &rest b)
(if (endp b) a
(apply #'add (+ a (first b)) (rest b))))
Shouldn't it be (+ a (apply + b))