Skip to content

Instantly share code, notes, and snippets.

Created December 14, 2012 19:27
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 anonymous/4287938 to your computer and use it in GitHub Desktop.
Save anonymous/4287938 to your computer and use it in GitHub Desktop.
(defn if-expro [input op output]
(fresh [test then else a b c d z y]
(== op {:op :if
:test test
:then then
:else else})
(dispatchopo input test a)
(jump-if-falseo a z b)
(dispatchopo b then c)
(jumpo c y d)
(dispatchopo d else output)
(code-len d z)
(code-len output y)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment