Max-lisp-eval-depth in multirember function -


in book "the little schemer" fourth edition, in chapter 8 there function "multirember & co", did in "emacs lisp" lenguage , resulting in following problem: emacs: nesting exceeds `max-lisp-eval-depth '

(defun multirember&co (a lat col)     (cond ((null lat) (funcall col '() '()))           ((eq (car lat) a) (multirember&co                                               (cdr lat)                                               (lambda (newlat seen)                                                   (funcall col newlat                                                                (cons (car lat) seen)))))     (t (multirember&co                        (cdr lat)                        (lambda (newlat seen)                            (funcall col (cons (car lat) newlat)                                          seen))))))    (defun a-friend (x y)   (null y))  (multirember&co 'tuna '(tuna) 'a-friend)  

emacs: nesting exceeds max-lisp-eval-depth'

what wrong code?

thanks in advance


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -