aboutsummaryrefslogtreecommitdiff
path: root/macros.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'macros.lisp')
-rw-r--r--macros.lisp13
1 files changed, 8 insertions, 5 deletions
diff --git a/macros.lisp b/macros.lisp
index fa93bc5..8cf528f 100644
--- a/macros.lisp
+++ b/macros.lisp
@@ -23,8 +23,7 @@
(declare (ignore subchar infix))
(let ((form1 (read stream)))
(if (symbolp form1)
- (list '$ (list (concatenate 'string "$"
- (symbol-name form1)))
+ (list '$ (list (concatenate 'string "$" (symbol-name form1)))
(read stream))
(list '$ () form1))))))
@@ -110,7 +109,11 @@ surrounding form.
`(lambda ,new-params ,expr)))
-
-
-
+(defmacro closure (&body body)
+ "Creates a lambda that accepts any number of arguments, all of which
+ are ignored."
+ (let ((args (gensym)))
+ `(lambda (&rest ,args)
+ (declare (ignorable ,args))
+ ,@body)))