Kai*_*Kai 12 nested clojure let
我想使用变量的值来计算同一let语句中另一个变量的值.有没有办法在Clojure中执行此操作而不使用嵌套的let?
嵌套让解决方案:
(let [x 3]
(let [y (+ 1 x)]
y)) = 4
Run Code Online (Sandbox Code Playgroud)
期望的解决方案:
(let [x 3
y (+ 1 x)]
y) = 4
Run Code Online (Sandbox Code Playgroud)