Arc Forumnew | comments | leaders | submitlogin
2 points by akkartik 4429 days ago | link | parent

  ;; implicit eval
  ($define! $or?
    ($mac (x y)
      ($let ((temp (gensym)))
        `(,$let ((,temp ,x))
           (,$if ,temp ,temp ,y)))))

  ;; explicit eval
  ($define! $or?
    ($vau (x y) env
      ($let ((temp (eval x env)))
        ($if temp temp (eval y env)))))
Seeing these two code snippets really drives home the point about implementing macros using fexprs, thanks. I'm going to go read chapter 7.3 like you suggest.