summaryrefslogtreecommitdiff
path: root/queue.lisp
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2023-01-16 00:30:57 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2023-01-16 00:30:57 -0300
commita8b56704b52488f2865387d8cded8e5f13cdf919 (patch)
treeb1fec64d8727e9f4692246702de3767435f7eaae /queue.lisp
parent42014cb6d5706f80d47ac2dbab7353ce832ee1e1 (diff)
downloadutils-a8b56704b52488f2865387d8cded8e5f13cdf919.tar.gz
utils-a8b56704b52488f2865387d8cded8e5f13cdf919.zip
Add alien call similar to what chezscheme has
Diffstat (limited to 'queue.lisp')
-rw-r--r--queue.lisp11
1 files changed, 4 insertions, 7 deletions
diff --git a/queue.lisp b/queue.lisp
index cc91eb8..c900731 100644
--- a/queue.lisp
+++ b/queue.lisp
@@ -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)