Skip to content

Instantly share code, notes, and snippets.

@PaulSandoz
Created November 2, 2011 12:55
(defn mandelbrot [c ^long limit]
(loop [rate limit
s (iterate #(+ (* % %) c) 0.0)]
(if (and (> rate 0) (< (abs (first s)) 2.0))
(recur (dec rate) (rest s))
rate)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment