From: David Vazquez Date: Fri, 28 Dec 2012 01:42:45 +0000 (+0000) Subject: Print improper lists X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=487ab9ca092c8788df374ceaac710c83b9f07ac3;p=jscl.git Print improper lists --- diff --git a/lispstrack.lisp b/lispstrack.lisp index 562f004..12fc7c9 100644 --- a/lispstrack.lisp +++ b/lispstrack.lisp @@ -436,8 +436,11 @@ ((functionp form) (concat "#")) ((listp form) (concat "(" - (join (mapcar #'print-to-string form) - " ") + (join-trailing (mapcar #'print-to-string (butlast form)) " ") + (let ((last (last form))) + (if (null (cdr last)) + (print-to-string (car last)) + (concat (print-to-string (car last)) " . " (print-to-string (cdr last))))) ")")))) ;;;; Reader