summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--control-flow.lisp13
-rw-r--r--list-functions-2.lisp6
2 files changed, 19 insertions, 0 deletions
diff --git a/control-flow.lisp b/control-flow.lisp
index b03a666..d9998e2 100644
--- a/control-flow.lisp
+++ b/control-flow.lisp
@@ -38,6 +38,19 @@
`(setq ,name ,value))
+(defmacro prog1 (form &body forms)
+ (let ((varsym (gensym)))
+ `(let ((,varsym ,form))
+ ,@forms
+ ,varsym)))
+
+(defmacro prog2 (form1 form2 &body forms)
+ `(progn
+ ,form1
+ (prog1 ,form2
+ ,@forms)))
+
+
;; FIXME: Should be (EVAL-WHEN (:compile-toplevel) ...).
(unless (boundp '+block-mapping-sym+)
(defconstant +block-mapping-sym+ (gensym "BLOCK-NAME")))
diff --git a/list-functions-2.lisp b/list-functions-2.lisp
index 09c8449..9bdb53e 100644
--- a/list-functions-2.lisp
+++ b/list-functions-2.lisp
@@ -115,3 +115,9 @@
(defun mapcon (function list &rest more-lists)
(%append (apply 'maplist (list* function list more-lists))))
+
+(defun nreverse (list)
+ (reverse list))
+
+(defun acons (indicator value alist)
+ (cons (cons indicator value) alist))