I'm working on a thin wrapper around a js library and I want to dynamically generate variables from a list for use in other namespaces.
e.g. Given a list of (:foo :bar :baz)
, I want to dynamically generate:
(def foo (some-fn foo))
(def bar (some-fn bar))
(def baz (some-fn baz))
I found some solutions for Clojure using interns
, but that differs in implementation in CLJS. Alternatively, I can generate and print the necessary expressions and evaluate it each time but I'm hoping for a more programmatic solution.