I know what state is by concept, but I can't understand how it's been implemented in this example: https://github.com/quil/quil/blob/master/examples/gen_art/31_oo_circles.clj
I just simply don't see it. State implementation happens on lines 100, 109, and 137:
98-100:
(defn mouse-released []
(add-circles (state :circles)))
109:
(set-state! :circles circles*)
135-140:
(defn draw []
(background 255)
(let [circles* (state :circles)
circles (swap! circles* update-circles)]
(doseq [c circles]
(draw-circle c))))
What is happening on those lines?
set-state! is a Quil method, its implementation can be found at https://github.com/quil/quil/wiki/set~state%21