Plaster

common-lisp
(setf *print-circle* t) (let ((lst (list 1 2))) (flet ((f (x) (declare (ignore x)) lst)) (apply #'nconc (mapcar #'f '(1 2))))) (let ((lst (list 1 2))) (flet ((f (x) (declare (ignore x)) lst)) (mapcan #'f '(1 2)))) #| By clhs: (mapcan f x1 ... xn) == (apply #'nconc (mapcar f x1 ... xn)) ( http://clhs.lisp.se/Body/f_mapc_.htm#mapcan ) However, the first form returns #1=(1 2 . #1#) while the second one loops forever. |# #| Implementations affected: sbcl, ccl, abcl, clisp, ecl, cmucl, maybe others. |#