It seems that declare
does the trick. I only found documentation on it for Clojure but it seems to work in ClojureScript as well.
Forward declaration of a function in Clojurescript
-
29-08-2022 - |
Question
I would like to forward-declare a function in ClojureScript. Kind of
(defn a [] (b))
...
(defn b [] ...)
I think what kind of works is to place a (def b nil)
in front of the usage (b)
but I wonder if there is a "better" way.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow