Last active
December 17, 2016 00:52
-
-
Save brandonbloom/b8a9ace37b93a6ff369d64e821a6e5ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def ^:dynamic foo []) | |
(def ^:dynamic bar) | |
(defn state [] | |
{#'foo foo, #'bar bar}) | |
(defn helper [] | |
(uses bar) | |
(defn step1 [] | |
(something foo (helper))) | |
(defn step2 [] | |
(something-else bar)) | |
(defn result [] | |
(yet-another-thing foo bar)) | |
(defn run [init-bar] | |
(with-bindings (assoc (state) #'bar init-bar) | |
(step1) | |
(step2) | |
(when debug | |
(pprint (state))) | |
(result))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment