Created
May 9, 2011 12:38
-
-
Save alexandreaquiles/962448 to your computer and use it in GitHub Desktop.
Land of LISP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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