Skip to content

Instantly share code, notes, and snippets.

@Denommus
Created April 16, 2013 21:44
Show Gist options
  • Select an option

  • Save Denommus/5399913 to your computer and use it in GitHub Desktop.

Select an option

Save Denommus/5399913 to your computer and use it in GitHub Desktop.
Global counter without global variable
(let ((counter 0))
(defun increment-counter ()
(incf counter))
(defun reset-counter ()
(setf counter 0))
(defun get-counter ()
counter))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment