Skip to content

Instantly share code, notes, and snippets.

@alexandreaquiles
Created May 9, 2011 12:38
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 alexandreaquiles/962448 to your computer and use it in GitHub Desktop.
Save alexandreaquiles/962448 to your computer and use it in GitHub Desktop.
Land of LISP
(defparameter *small* 1)
(defparameter *big* 100)
(defun guess-my-number ()
(ash (+ *small* *big*) -1))
(defun smaller ()
(setf *big* (1- (guess-my-number)))
(guess-my-number))
(defun bigger ()
(setf *small* (1+ (guess-my-number)))
(guess-my-number))
(defun start-over ()
(defparameter *small* 1)
(defparameter *big* 100)
(guess-my-number))
(if (and *file-modified*
(ask-user-about-saving))
(save-file)))
(if (member nil '(3 4 nil))
'nil-is-in-the-list
'nil-is-not-in-the-list)
(eq () nil))
(eq () '(nil))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment