Skip to content

Instantly share code, notes, and snippets.

@magnars
Created June 4, 2012 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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