Skip to content

Instantly share code, notes, and snippets.

@ohcibi
Created April 3, 2014 17:54
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 ohcibi/9959348 to your computer and use it in GitHub Desktop.
Save ohcibi/9959348 to your computer and use it in GitHub Desktop.
(defn trans-alive? [net trans]
(let [inputs (filter #(= (:trans %) (:name trans)) (:input net))]
(every? (fn [input]
(<= (:weight input)
(:token (some #(= (:name %) (:name input)) #{}))))
inputs)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment