Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (def circles (atom [{:x 1, :y 2, :x-speed 0.5, :y-speed 0.5}
- {:x 3, :y 4, :x-speed 0.5, :y-speed 0.5}]))
- (swap! circles (fn [v] (map (fn [c] (assoc c
- :x (+ (:x c) (:x-speed c))
- :y (+ (:y c) (:y-speed c)))) v)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement