In REPL, this code worked just fine and gives the answer 36
(do
(load-string (str "(def yyy" 2 " 18)"))
(* 2 yyy2))
While it wouldn't work when I introduced a for loop into it
(do
(for [x [1 2 3]]
(load-string (str "(def yyyy" x " 18)")))
(* 2 yyyy2))
The error said unable to resolve symbol yyyy2, which should have been defined within load-string. Can some expert explain the reason for me? Thanks!