Skip to content

Instantly share code, notes, and snippets.

@aaz
aaz / iterated-function.clj
Created January 11, 2014 12:01
Example taken from SFI Introduction to Dynamical Systems, Unit 1 homework, Q4 in the beginner section.
;; Define the function h
(defn h [x] (+ (* 0.5 x) 10))
;; Show the first 7 values of the iteration of function h with seed 4
(take 7 (iterate h 4))