Skip to content

Instantly share code, notes, and snippets.

@davidwallacejackson
Created October 21, 2012 20:36
Show Gist options
  • Select an option

  • Save davidwallacejackson/3928412 to your computer and use it in GitHub Desktop.

Select an option

Save davidwallacejackson/3928412 to your computer and use it in GitHub Desktop.
(defsignal inc-a [a :a] :a
(+ a 1))
;;should generate:
(defn inc-a [state_unique_blah]
(let [a (get-in state_unique_blah [:a])]
(+ a 1))
;;next, I'll rework it to generate something more like
(defn inc-a [state_unique_blah]
{:a (let [a (get-in state_unique_blah [:a])]
(+ a 1))})
;;or maybe
(defn inc-a [state_unique_blah]
(conj state_unique_blah {:a (let [a (get-in state_unique_blah [:a])]
(+ a 1))}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment