I want to create several defs in a file at compile time without typing everything. I would like to do something like:
(ns itervals) (loop [i 0] (if (<= i 128) (do (def (symbol (str "i" i)) i) (recur (+ i 1)))))
Thus, we define the variables i1, ..., i128 in the current context. I cannot figure out a way to do this at compile time without explicitly defining them. I think macros can be a way, but I have no idea how to do this.
source share