Skip to content

Instantly share code, notes, and snippets.

@davidwallacejackson
Created October 21, 2012 20:36
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 davidwallacejackson/3928414 to your computer and use it in GitHub Desktop.
Save davidwallacejackson/3928414 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