5e42deadf773

Improve prl, remove dep on alexandria
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sun, 05 May 2019 11:40:57 -0400
parents 71b34a9a3413
children e48985ef1aac
branches/tags (none)
files src/clos.lisp src/debugging.lisp src/iterate.lisp

Changes

--- a/src/clos.lisp	Fri Mar 08 22:09:23 2019 -0500
+++ b/src/clos.lisp	Sun May 05 11:40:57 2019 -0400
@@ -26,7 +26,7 @@
   automatically be filled in with sane values if they aren't given.
 
   "
-  (destructuring-bind (name &key (conc-name (symb name '-)))
+  (destructuring-bind (name &key conc-name)
       (ensure-list name-and-options)
     `(defclass ,name ,direct-superclasses
        ,(mapcar (curry #'build-slot-definition conc-name) slots)
--- a/src/debugging.lisp	Fri Mar 08 22:09:23 2019 -0500
+++ b/src/debugging.lisp	Sun May 05 11:40:57 2019 -0400
@@ -32,7 +32,12 @@
 
   "
   `(prog1
-    (progn ,@(mapcar (lambda (arg) `(pr ',arg ,arg)) args))
+    (progn ,@(mapcar (lambda (arg)
+                       (with-gensyms (a)
+                         `(let ((,a ,arg))
+                            (pr ',arg ,a)
+                            ,a)))
+                     args))
     (terpri)
     (finish-output)))
 
--- a/src/iterate.lisp	Fri Mar 08 22:09:23 2019 -0500
+++ b/src/iterate.lisp	Sun May 05 11:40:57 2019 -0400
@@ -722,7 +722,7 @@
 
   "
   ;; TODO: result-type
-  (alexandria:with-gensyms (min value m-value tail)
+  (with-gensyms (min value m-value tail)
     (let ((result (or var iterate::*result-var*)))
       `(progn
          (with ,result = '())
@@ -760,7 +760,7 @@
 
   "
   ;; TODO: result-type
-  (alexandria:with-gensyms (max value m-value tail)
+  (with-gensyms (max value m-value tail)
     (let ((result (or var iterate::*result-var*)))
       `(progn
          (with ,result = '())
@@ -798,7 +798,7 @@
   (let ((result (or var iterate::*result-var*)))
     (typecase test
       ((cons (eql function) (cons t null))
-       (alexandria:with-gensyms (value)
+       (with-gensyms (value)
          `(progn
             (for ,value = ,expr)
             (when (funcall ,test ,value)