Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(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