Skip to content

Instantly share code, notes, and snippets.

@mgandin
Last active December 16, 2015 20:09
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 mgandin/87441a88aa057c9ee6d9 to your computer and use it in GitHub Desktop.
Save mgandin/87441a88aa057c9ee6d9 to your computer and use it in GitHub Desktop.
Code from Chapter 2 of Land Of Lisp in Clojure
(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