Skip to content

Instantly share code, notes, and snippets.

@rhz rhz/gist:871248
Created Mar 15, 2011

Embed
What would you like to do?
(defn get-molecule [state mol]
(get-in state [:mixture mol] 0))
(defn get-activities [state] ;; FIXME this fn takes upto 80% of the time
(into {} (for [{:keys [lhs rate] :as r} (:rxns state)]
[r (apply * rate (for [[mol freq] lhs]
(* (get-molecule state mol) freq)))])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.