by joshlemer · 2mo ago · 0 comments
(defn foo []
(+ 1 2))
to (defn foo []
(let [x 2]
(+ 1 x)))
I wish that there were some kind of macro available in Clojure that would provide a local "def" kind of functionality that doesn't pollute the namespace and just creates a binding in the parent scope. So that you could do something like: (defn foo []
(let! x 2)
(+ 1 x))No comments yet.