(defun proper-list-p (object) (when (listp object) (do ((fast object (cddr fast)) (slow object (cdr slow))) (nil) (when (atom fast) (return (null fast))) (when (atom (cdr fast)) (return (null (cdr fast)))) (when (and (eq fast slow) (not (eq fast object))) (return nil)))))