I know how to redirect a var declaration for the current namespace. Instead, I want to declare var from another namespace. How can I do it? This will help me eliminate the circular load dependency.
At the moment, this is what I tried:
; this_ns.clj
(ns my-project.this-ns
(:require ...))
(ns my-project.other-ns)
(declare other-func)
(ns my-project.this-ns) ; return to original namespace
(defn func-1
[]
(my-project.other-ns/other-func))
It works, but I don't like it.
source
share