Skip to content

Instantly share code, notes, and snippets.

@arnsholt
Created November 3, 2015 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnsholt/4d285d91f7ad8bb892b4 to your computer and use it in GitHub Desktop.
Save arnsholt/4d285d91f7ad8bb892b4 to your computer and use it in GitHub Desktop.
(let ((x 0))
(defmacro foo ()
(incf x)
x
)
)
(loop for i from 0 to 3 do (format t "~A~%" (foo)))
; Results:
; CL-USER(1): (load "test.lisp")
; ; Loading /home/arne/test/test.lisp
; 1
; 2
; 3
; 4
; T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment