Skip to content

Instantly share code, notes, and snippets.

@vorce

vorce/henon.clj

Last active Mar 7, 2016
Embed
What would you like to do?
(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
You can’t perform that action at this time.