Created
December 16, 2015 06:50
-
-
Save hessammehr/3adae2764ba3bc2cab18 to your computer and use it in GitHub Desktop.
Cyclic dependency with quoted vars
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
(ns myapp.actions | |
:require [myapp.core :refer app-state]) | |
(defn action1 [] | |
(swap! app-state inc) |
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
(ns myapp.core | |
(:require [myapp.settings :as settings]) | |
(defonce app-state (atom {:a 2})) | |
(def on-key-press [k] ; for the sake of argument | |
((settings/keymap k)) |
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
(ns myapp.settings | |
(:require [myapp.actions :as actions]) | |
(def keymap {\i #'actions/action1}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment