Skip to content

Instantly share code, notes, and snippets.

@magnars
Created June 4, 2012 13:06
Show Gist options
  • Save magnars/2868250 to your computer and use it in GitHub Desktop.
Save magnars/2868250 to your computer and use it in GitHub Desktop.
accumulate-forces
(defn accumulate-forces [o os]
(assoc o :force
(reduce vector/add (map (partial force-between o)
(filter #(not (identical? o %)) os)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment