From de143451c3a72616963340ef7cfea97fcedba3ae Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 5 Jul 2008 23:07:13 +0200 Subject: Add macro %DEFUN. --- cond.lisp | 11 +++++------ init.lisp | 1 + util.lisp | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 util.lisp 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)))))) -- cgit v1.2.3