From: David Vazquez Date: Sat, 15 Dec 2012 23:55:13 +0000 (+0000) Subject: Add incf! X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=7226856a758758ffd387ccb74e1045643d3d37b7;p=jscl.git Add incf! --- diff --git a/test.lisp b/test.lisp index f4c48ac..54d4a63 100644 --- a/test.lisp +++ b/test.lisp @@ -22,7 +22,15 @@ ;;; Macros (debug "---MACROS---") + +(eval-when-compile + (%compile-defmacro 'incf + (lambda (y) + (list 'setq y (list '+ 1 y))))) + (eval-when-compile - (%compile-defmacro 'f (lambda (x) (list '+ x 10)))) + (%compile-defvar 'x)) -(debug (f 10)) +(setq x 0) +(incf x) +(debug x)