Last active
August 29, 2015 13:59
-
-
Save m0smith/10928463 to your computer and use it in GitHub Desktop.
Depedency Injection in Clojure 3 - Function Argument
This file contains hidden or 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
(defn foo [context] | |
(let [db (:db context)] | |
(update! db "foo"))) | |
(defn start-app [context] | |
(foo context)) | |
(start-app (init-context)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment