diff options
Diffstat (limited to 'Sacla/share-2.lisp')
-rw-r--r-- | Sacla/share-2.lisp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Sacla/share-2.lisp b/Sacla/share-2.lisp new file mode 100644 index 0000000..a92010a --- /dev/null +++ b/Sacla/share-2.lisp @@ -0,0 +1,11 @@ +(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))))) |