From 487ab9ca092c8788df374ceaac710c83b9f07ac3 Mon Sep 17 00:00:00 2001 From: David Vazquez Date: Fri, 28 Dec 2012 01:42:45 +0000 Subject: [PATCH] Print improper lists --- lispstrack.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 1.7.10.4