Created
December 14, 2014 11:16
-
-
Save LuminousMonkey/ec9413fa59d85ecf0719 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(defn paradox | |
"Will take number of trials and return the average." | |
[s] | |
(/ (reduce + (take s (repeatedly | |
#(reduce * 2 (map inc (take-while odd? (repeatedly (fn [] (rand-int 2))))))))) s)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment