Skip to content

Instantly share code, notes, and snippets.

@PaulSandoz
Created November 2, 2011 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulSandoz/1333551 to your computer and use it in GitHub Desktop.
Save PaulSandoz/1333551 to your computer and use it in GitHub Desktop.
(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