fork download
  1. (defmacro block
  2. ([] `nil)
  3. ([hd & tl]
  4. (if (and (seq? hd) (#{'let 'let*} (first hd)))
  5. `(let ~(second hd) (block ~@tl))
  6. `(do ~hd (block ~@tl)))))
  7.  
  8. ; (use 'clojure.walk) (println (macroexpand-all '
  9. (block
  10. (let [x 1])
  11. (let [y 2])
  12. (println (+ x y))
  13. (let [z 3])
  14. (println (+ x y z)))
  15. ; ))
Success #stdin #stdout 1.74s 335040KB
stdin
Standard input is empty
stdout
3
6