diff options
Diffstat (limited to 'queue.lisp')
-rw-r--r-- | queue.lisp | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -1,6 +1,6 @@ (in-package #:queue) -(declaim (optimize (speed 3) (safety 0))) +(declaim (optimize (speed 3) (safety 1))) (defun new () (cons nil nil)) @@ -8,12 +8,9 @@ (defun add (q datum) (let ((element (cons datum nil))) (if (car q) - (progn - (setf (cddr q) element) - (setf (cdr q) (cddr q))) - (progn - (setf (car q) element) - (setf (cdr q) element))) + (setf (cddr q) element) + (setf (car q) element)) + (setf (cdr q) element) q)) (defun sub (q) |