(I saw this question, but it's a different problem)
I want to be able to dynamically create variables within a let statement, for example from a list. So to get the following:
(let [a (my-fn :a)
b (my-fn :b)
c (my-fn :c)])
could I do something like this? (especially, without macros?)
(let [ (map (fn [x] '(x (my-fn x)))
[:a :b :c])]) ;;<- this code obviously doesn't work
EDIT: I was trying to be general about the problem, but maybe too much so. At the suggestion that this is an XY problem, that I might be solving my real problem with a bad solution, here's what I want it for: to make forms in re-frame that might have many inputs, and to reduce the complexity of writing the same thing over and over. Ex:
(let [project-form (re-frame/subscribe [:project-form])
id (rand-int 10000)
project-name (reaction (:project-name @project-form))
social-acct (reaction (:social-acct @project-form))
contact (reaction (:contact @project-form))
description (reaction (:description @project-form))] ...)