fork download
  1. (defn im-stmts [stmts]
  2. (cond
  3. (empty? stmts) `nil
  4.  
  5. (and (seq? (first stmts))
  6. (= 'let (ffirst stmts)))
  7. `(let ~(second (first stmts))
  8. ~@(im-stmts (rest stmts)))
  9.  
  10. true `(do ~(first stmts) ~(im-stmts (rest stmts)))))
  11.  
  12. (defmacro im [& body]
  13. (im-stmts body))
  14.  
  15. (im (let [x 1])
  16. (println x)
  17. (let [y 2])
  18. (println y)
  19. (println (+ x y)))
Success #stdin #stdout 1.71s 335104KB
stdin
Standard input is empty
stdout
1
2
3