summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-05 23:07:13 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-05 23:07:13 +0200
commitde143451c3a72616963340ef7cfea97fcedba3ae (patch)
tree2bc5c8585b34be7fa73149762deaadd82460709f
parent3f0750517277e118fa82221e1124a0a93aeb8356 (diff)
Add macro %DEFUN.
-rw-r--r--cond.lisp11
-rw-r--r--init.lisp1
-rw-r--r--util.lisp4
3 files changed, 10 insertions, 6 deletions
diff --git a/cond.lisp b/cond.lisp
index e5aed02..7b3d1cc 100644
--- a/cond.lisp
+++ b/cond.lisp
@@ -1,9 +1,8 @@
-(%fset 'list*
- (%lambda args
- (if (null (cdr args))
- (car args)
- (cons (car args)
- (apply 'list* (cdr args))))))
+(%defun list* args
+ (if (null (cdr args))
+ (car args)
+ (cons (car args)
+ (apply 'list* (cdr args)))))
(%defmacro let* args
(let ((form (car args)))
diff --git a/init.lisp b/init.lisp
index 57652b6..8c93cc9 100644
--- a/init.lisp
+++ b/init.lisp
@@ -1 +1,2 @@
+(load "util.lisp")
(load "cond.lisp")
diff --git a/util.lisp b/util.lisp
new file mode 100644
index 0000000..ed4c3a0
--- /dev/null
+++ b/util.lisp
@@ -0,0 +1,4 @@
+(%defmacro %defun args
+ (list '%fset
+ (list 'quote (car (cdr (car args))))
+ (cons '%lambda (cdr (cdr (car args))))))