Created
April 24, 2011 09:00
-
-
Save GeorgeJahad/939419 to your computer and use it in GitHub Desktop.
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
(ns gbj1 | |
(:require gbj2)) | |
(println "gbj1") | |
(defmacro remote-declare [name] | |
"defs the supplied ns-qualified name with no bindings, useful for creating circular dependencies" | |
(let [[ns v] (.split (str name) "/") | |
orig-ns (str *ns*)] | |
`(do (in-ns '~(symbol ns)) | |
(clojure.core/declare ~(symbol v)) | |
(in-ns '~(symbol orig-ns))))) | |
(remote-declare gbj2/a) | |
(defn a [] (gbj2/a)) | |
(defn b [] :b) | |
(defn c [] :c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment