Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vemv committed May 10, 2012
1 parent b6c3be5 commit f0e3b98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clj_automata/core.clj
Expand Up @@ -145,7 +145,7 @@
;; Our initial state is a single row of random 0s and 1s
initial (repeatedly height #(rand-int 2))
sim (simulation (rule rule-num) initial)
;; We use partition as a sliding wintdow here. Since sim is
;; We use partition as a sliding window here. Since sim is
;; an infinite lazy sequence of future rows we use the 3-arity
;; version of partition here to create a 2D view of the visible range
;; of results. Since this is the 3-arity version of partition, with 1
Expand All @@ -168,7 +168,7 @@
;; tail recursive loop and not-utilizing the draw callback, but that's left
;; as an excercise for the reader.
(draw-buffer (first @time-slices) scale)
(swap! time-slices (fn [_] (rest @time-slices))))
(swap! time-slices rest))
:size [(* scale width) (* scale height)])))

(defn -main [rule-num & args]
Expand Down

0 comments on commit f0e3b98

Please sign in to comment.