HNHacker News
TopNewBestAskShowJobs

xclojure

1 karma · joined December 6, 2014

submissionscomments
xclojure··on Almost all numbers contain the digit “3” [video]
Here is a visualization of the number convergence:

(loop [i 1 t [10N] v [1.0]] (if (> i 300) (map (fn [[a b]] (/ a b)) (partition 2 (interleave v t))) (recur (inc i) (conj t (* 10 (last t))) (conj v (+ (* 9 (last v)) (Math/pow 10 i))))))

xclojure··on A Formula for the Number of Days in Each Month
Why is it any better/faster than a simple switch case like this in Clojure: #(case % 1 31 2 28 3 31 4 30 5 31 6 30 7 31 8 31 9 30 10 31 11 30 12 31)