Created
May 17, 2010 17:23
-
-
Save eschulte/403990 to your computer and use it in GitHub Desktop.
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
(in-ns 'propagator) | |
(cell guess 1) | |
(cell x 9) | |
(cell done false) | |
(cell margin 0.1) | |
(propagator enough [x guess] [done] | |
(Thread/sleep 1000) | |
(if (< (abs (- (* guess guess) x)) @margin) true false)) | |
(propagator heron [x done guess] [guess] | |
(Thread/sleep 1000) | |
(if done | |
guess | |
(/ (+ guess (/ x guess)) 2.0))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment