Skip to content

Instantly share code, notes, and snippets.

@vorce
Last active March 7, 2016 15:17
Show Gist options
  • Save vorce/7d3aa0efee1ce94a9d5d to your computer and use it in GitHub Desktop.
Save vorce/7d3aa0efee1ce94a9d5d to your computer and use it in GitHub Desktop.
(defn _henon [x y]
(let [x1 (* 1.4 (Math/pow x 2))]
[(+ y (- 1 x1)), (* x 0.3)]))
(defn henon [x y]
(let [[hx hy] (_henon x y)]
(lazy-seq (cons [hx hy] (henon hx hy)))))
; Example usage: (take 100 (henon 1 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment