Last active
December 16, 2015 20:09
-
-
Save mgandin/87441a88aa057c9ee6d9 to your computer and use it in GitHub Desktop.
Code from Chapter 2 of Land Of Lisp in Clojure
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
(def *small* 1) | |
(def *big* 100) | |
(defn guess [] | |
(Math/round (double(/ (+ *big* *small*) 2)))) | |
(defn smaller [] | |
(def *big* (guess)) | |
(guess)) | |
(defn bigger [] | |
(def *small*(guess)) | |
(guess)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment