Use let instead of def for the first definition of a throw and insert the remaining def calls inside let :
(let [root-dir (File. "projects/my-project") src-folder (File. root-dir "src")] (def lib-folder (File. src-folder "lib")) (def dist-folder (File. src-folder "bin")))
The src-folder local binding value is discarded after the let evaluation, leaving only the available lib-folder and dist-folder vars for the rest of the program.
source share